Forms :: Linking Form Operations To Values In A Field
Sep 8, 2014
I have a combo box field called "investigations" on a patient database which can allow multiple values. Each of its values represent the different investigations a patient can do. Now those investigations are tables and forms in the database. how can i program the database to simultaneously open these forms "on update" of that field-investigations?
I have created a table that holds the inventory information of some items i have in stock. What I want to do is this:
1.)When a customer orders something, i enter the quantity ordered and hit a process button. When this button is clicked it automatically reduces my inventory count to reflect the reduction
2.)When I receive shipments, i want to enter the information and hit process so that it automatically sets my inventory counts to reflect the addition of the new units
I am having trouble figuring out how to go about doing this. I was thinking of somehow setting up some textfields and then adding buttons that set fields accordingly.
I'm pretty good with setting up a very simple database such as inventory, profiles, etc.. However I'm creating a database to keep track of a football (soccer) team's players and match statistics.What I have so farsample attached)
Tables: * Players - PlayerID, Fname, Lname, position, goals, assists, etc (all details regarding a player) * Position - Positons (Table containing positions eg: defender. Data is selected in player's form as a combo-box) * Competition - Competition types (Cup, League, Friendly. Data is selected in Match's form as a combo-box * Venue - similar to Competition table * Opponent - Similar to above two tables * Match - MatchID, Competition, Venue, etc (form corresponding to table attached)
Forms: * Player form * Match form
Now as shown in the sample, I choose players using the combo-box. Then whatever stats they had during the match are entered on the fields provided. How to link the player (selected using combo box) to the stat fields (goals, assist, YC, etc).
I have an entry form with a field(combo box) called cboGetCode. I also have a sub form (continuous form) with number of fields, also an entry form. Now, I have added a code behind the cboGetCode AfterUpdate event to populate the result to relevant fields in the main form.
OK - I'm a bit of a novice at access and the answer to this may be very simple but any help would be much appreciated.
I have a problem getting a Combo box field in a table to link to another table and input a relevant value in another field of the same table. Here is what I've got:
Table 1 - Client Fields - CLIENT ID, CLIENT NAME
Table 2 - Client Rates (The rates charged to the client for 3 specific items that do not change) Fields - CLIENT ID, SC, LX, SX. (These last three are the codes for the items and the values in the field are the currency values for the items as they are charged to the specific client)
Thanks Table 3 - Job Details Fields - JOB ID (Autonumber for the Job), CLIENT ID (Who the job is for), ITEM (This is a combo box that selects between the items i.e. SC, LX and SX), RATE (I want this to recognise the item chosen in the previous field and display the corresponding rate for that item and for that client - This is my problem!) :mad:
I will attach the database as I currnetly have it so that you can see what I'm talking about. As I say - any help is muchly appreciated
I am creating a customer database for an independent insurance agency. Within that customer database, we have a lookup field that references another table "Carriers". This is where we select the insurance carrier we have placed the clients insurance with (ex. Geico, progressive, etc). This field allows multiple entries since clients can have policies with different companies.
We also have contact detail forms for each of our insurance carriers where we store information like web logins, contact phone numbers, and other notes. These forms are based on the same table as the lookup field.
I would like to create a hyperlink so, if we are looking at a clients form with all of their contact info we can click the insurance company in the carrier field and it will bring us to the contact details form of that carrier.
I have form named home page in this homepage form in the form header i have inserted some fields from some tables like province, district, community etc. these fields are unbound and are used for filtering purposes, when i select a province all districts related to that province displayed and when i select a a district all related communities displayed, there is a one to many relationship between district table and community table,
What I want is, when i select a district on the form header(it is unbound as i explained before) of this homepage form, the DistrictID should appear in community subform under DistrictID(as there is a one to many relationship between district and community) .
For more clarification find the snap shot attached...
I have "LossForm" to record loss of inventory items due to damage, theft, etc. It has "Loss Subform" for input of multiple items. The row has a calculated field "TotalLoss" (from qty * itemcost). The footer of subform has unbound text field =Sum(nz([TotalLoss])). This all works fine. The problem I have is that I need to pass the total to another form. I want to have a pop-up form to use some of the field values from the Loss form. I have been able to pass all of the field values except for the TotalLoss.
pop up form: Set frmPrevious = Screen.ActiveForm Me.TransactionID = frmPrevious.LossID Me.EntryType = "Loss" Me.Date = frmPrevious.LossDate { Me.Amount = frmPrevious.TotalLoss doesn't work } DoCmd.Save End Sub
I also tried to setup a global, class, and module variable but keep getting error message of undefined variable.
I have a simple add form that will add an entry to one of two tables: Box 1-1, or Box 1-2.
They have the exact same fields. In the add form, I want the user to specify a Rack field and a Box field. Box 1-1 would be Rack 1, Box 1. Box 1-2 would be Rack 1, Box 2 (there will be more tables later, but just using two for now until I get it working).
But right now my form always adds to the table Box 1-1 - I can't get it to switch.
I've added the code I have so far below. The first part is what I'm having trouble with, the second part just uses a Submit button to add a new record - I'm just including it in case it's interfering in some way I'm not seeing. I'm running Access 2007.
Code: Private Sub Switch_BeforeUpdate() If Me.Rack.Value = "1" And Me.Box.Value = "1" Then Form_Add.RecordSource = "Box 1-1" ElseIf Me.Rack.Value = "1" And Me.Box.Value = "2" Then Form_Add.RecordSource = "Box 1-2"
I have several result fields which are all drop down lists. I want each result field's drop down list values to be different depending on the selected value of the Test1 drop down list.I came up with using the .rowsource keyword. My syntax seems to be fine but I'm not getting any values under the result fields when I run the form.Here is my code so far:
Private Sub Test1_AfterUpdate() If Me.Test1 = "Stress Echo" Or Me.Test1 = "Stress SPECT" Or Me.Test1 = "Stress PET" Or Me.Test1 = "Stress MRI" Then Me.Test1Result2.RowSourceType = "Value List" Me.Test1Result3.RowSourceType = "Value List"
On the Flow Meter Form Info is listed specifically for each Flow Meter.
I would like to bring some of the information from the Contacts table on this form.
For Instance if I am on Meter 1T-02 I would like for it to associate that meter number with the name of the customer thats already on the form, then look up that customer's name in the contact table and bring over that customer's contact information.
I built this database over a year ago and it has been a long time since I have worked with the design of it, therefore I am a bit rusty.
i want to add a control in that form that sums up and aggregate all the values of field called [amount] based on the value of [Name_Patient] as criteria
Each month I receive a new excel spreadsheet (alpha Roster), Last month I created a form so that I can track certain things off of the Table (spreadsheet), I just received the new Spreadsheet for this month and was wondering if I can use the existing form and how hard it is to link it to the new spreadsheet? Is that even possible? I don't want to have to re create the form every month, I would like to just bring the new alpha roster in and be ready to work.
problem is that i have 2 tables - Consolidated Orders, Customers.
Customers has 2 fields with a record inside one field with the clients name , but it also has an address in another field in the same table which i want to link to the name of the client because in my invoice i show the companies name and to the left of it i show their address.
i wish to link the two fields together so that when the name shows up, the address of the client will be to the left side .
I'm not familiar with Access very much and this is my situation:
I've got a table Routes with RouteID, Route, Route_price; a tabe Invoices with InvoiceID, Units, Route, Route_price, Total. I've got a form, where I input Units, choose Route from the combo box.
Needed action:
I input Units, then choose Route, the corresponding Route_price should be chosen, shown and multiplicated with Units. The Total must be shown. The Route, Route_price, Units, Total must be saved in table Invoices.
I don't know how:
pick Route_price according to selected Route and multiply it with entered Units and then show Total. store all values in Invoice.
I thought this would be pretty simple, but I cannot figure out how and wasn't able find the solution here or anyway.
I have a source form. (I can resort to having a Table with OLE Object if I must, but prefer not to.) On this source form I wish to include different things such as company logo. This will determine what logo shows up in all the reports, so all the reports will have an image linking back to this embedded image on the source form.
Pseudo-code Example: frmSource contains imgLogo rptSample contains an image whose control source = Forms!frmSource!imgLogo
How can I do this or achieve the same effect in a more-or-less simple way?
I am trying to link two unrelated sub forms to a main form so I am able to query data all at once and make a report that displays all this data at once. I do not know if this is possible. I will tell you to the best of my ability about what I have going on.
My main form is a shift report. The primary key is a auto number ID. The rest of the fields are date, name, shift, vehicle. etc.
The first sub form is area attendance. Field are as follows auto number ID (primary key), report ID(which comes from the main form, linked), the area, and the area attendance.
The second sub form is the event log. Fields are as follows auto number ID (primary key), report ID(which comes from the main form, linked), time in, and events.
My relationship now is simply primary key from the shift report (the autonumber) going to the first and second subforms report ID's.
Problem is I can not query two distinct subforms like this (I realized).
I'm not sure whether I should put this in two separate posts, but here goes...
I have just started constructing a database which has many levels. Some of the field records may not have an entry (as they may not be known) and calculations must be done between these levels. The bottom level is in the form of matrices and I am unsure of what implications this could cause to implementing them in the calculations.
1) I assume from what I know that non-values (or empty record fields), will not work in queries (i.e. they will not be ignored, they will be given a value such as 0 to be used in the calculation). I therefore ask, is it easier to exclude these non-values from the query - or is it better to assign a default value such as -9999, then filter these values out? Would it be easier to do this exclusion using a filter, or using code?
2) My second question may not even be possible but... My calculations will involve using values from matrices. I am not sure of the most effective way of using these values in a query? I think there are several options, of which, these two may be the best options. - turn a matrix from Excel into a table in Access (will mean lots of records - but can be done) - link a matrix in Excel to an existing query in Access.
Now, the second option may not be possible, but what I would like to do is link a certain cell from Excel to a certain query - depending on the calculation. i.e. Cell A4 used in Query1 and Cell A5 used in Query2.
I am sorry that I am so ignorant in these matters, but I have been asked to find out what the best way of approaching this is.
Thankyou all very much for your time, I hope what I am trying to achieve is clear!