Can a Combo Box Use (2) tables to pull from instead of one ???

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

On my form the combo list uses the below to select a customer from the table
customers
Can I also make it use the table employees as well
So that if I can choose from either my cutomers or employees!?!

SELECT Customers.Customers FROM Customers ORDER BY Customers.Customers;
 
On my form the combo list uses the below to select a customer from the table
customers
Can I also make it use the table employees as well
So that if I can choose from either my cutomers or employees!?!

SELECT Customers.Customers FROM Customers ORDER BY Customers.Customers;

You can use a UNION query for this purpose:

SELECT Customers.Customers FROM Customers ORDER BY Customers.Customers
UNION ALL
SELECT Employees.Employee FROM Employees ORDER BY Employees.Employee
ORDER BY 1;

Note that (unless you simplified your example) you may be in a bit of
trouble: names are NOT unique, and you could have one employee named
Jim Smith and three customers also named Jim Smith!
 
Back
Top