Control to pull from two tables.

skelley

Registered User.
Local time
Today, 18:52
Joined
Jul 11, 2000
Messages
69
How can I make a control (i.e. [ShipTo]]) have the user be able to select from two separate tables (i.e. tblCustomers and tblVendors)???
 
Skelly
What you want is a Union Query. If you have two or more tables with matching field names, you can set the rowsource of a combo box to a Union Query String. Following is an example from one of my apps...

SELECT id_string & ID, id_string FROM tblRequest UNION SELECT id_string & ID, id_string FROM tblExcursion UNION SELECT id_string & ID, id_string FROM tblRandD UNION SELECT id_string & ID, id_string FROM tblUnrelated ORDER BY id_string;

Hope this helps...
Chris
 

Users who are viewing this thread

Back
Top Bottom