Form - table relationship

Core

Registered User.
Local time
Today, 11:01
Joined
May 27, 2008
Messages
79
I have 2 tables like so:

1:
ID
Name
NIID*

2:
ID*
NAME

My form is based on Table 1, and has a combo box linked to the NIID field. I whish the drop down to displace the records table 2 and once selected his name to appear as the text in the combo box.

Is that doable and how?
 
Open up the properties for the drop down, go to the 'Data' tab and do the following:

Set the Control Source to NIID

Change the Row Source Type to 'Table/Query'

Click the elipses (...) to the right of Data Source
-a query design form will appear, bring in your 2nd table, bring down ID field and the Name field. Be sure to do it in that order. Close and save the query.

Set the Bound Column to 1

Next click on the 'Format' tab and change Column Count to 2 and Column widths to this:
0";1"

That should set your drop down to how you want it.

Lastly, 'Name' is a poor choice for a field name, its a reserved word and will cause issues when setting up code and queries. I'd change it by prefixing it with what the data actually is for (ClientName, EmployeeName, etc.)
 
Yeah they were not the real field names. Thanks a lot for that walk through, very helpful and worked a treat.
 

Users who are viewing this thread

Back
Top Bottom