I have a master form that is based on a Dynamic Query. It uses only one table for it's record source which is Time. It draws the customers information from the Customers table via a lookup. Here is my dilemna. I want to be able to have the form show on it the individual customers discount/material markup. I have these fields already in the Time table which the form is using. Should I just reference the customers using =[Forms]![Customers]![OvrHd] for example for the fields control source or add the customers table to the query and do it that way? The autonumber and primary key for the Time table is TimeID
The Customers table has its primary key set to Customer ID.
Should I add Customer ID to the Time table so that they can link together?
The Customers table also has a field in it named CustID which is a autonumber
I assume that when you open the form you have no information on it. You then have a lookup (combobox?) to find the customer's time information.
If the above is true, then you would do the following: have two unbound textboxes, one for overhead and one for material markup. At form opening, the boxes should be set to empty ("").
When the combobox looks up the customer, have the combo's row source query include the two columns. In the combo's OnUpdate() event, set the two textboxes using "Textbox1= Me!ComboBoxName.Column(x)" format. Don't forget that Column() is a zero-based array, so the first column is Column(0).
If you are opening the form with the lookup information already pre-progammed, then you can include the two columns in the OpenForm method, and make the two new textboxes bound to the two extra columns using the above format.