Populating one field based upon another

stuart_adair

Registered User.
Local time
Today, 00:11
Joined
Jan 13, 2009
Messages
57
Hello all,

I've read some historical answers about my question but I'm still struggling, so apologies if I'm raising an old question...

I've got a form with a field called 'Depot' which saves to a table called, Main. I've also got a field called, "Region" in the same table which is currently blank.

I've got another table which contains all the depots and their respective regions in the format.

Column 1 Column 2
Leeds North
Bristol South
Swansea Wales
etc...

When I enter a value in the depot (Combo box) field I want the region field to automatically populate the region.

Many thanks in advance.

Stu
 
Use a combo box to pick the "Depot" from. The data for combo box should be populated by the table that has "Depot" and "Region". It should have two columns. The second column does not need to be visible (controlled by Column Widths property)
Use the following expression as the Control Source property of the text box in which you want the "Region":
= [NameOfComboBox].Column(1)

The data for "Region" should NOT be stored in any other table.
 
Genius Bob. I can see the logic now and I've got the region populating exactly as I want it on the form. Only hurdle I now need to overcome is to get the region field of each record on my database to match the text box linked that is displaying the region on the form.
Thanks once again. Stu
 

Users who are viewing this thread

Back
Top Bottom