Combo box - multiple tables

axw

Registered User.
Local time
Today, 02:21
Joined
Jun 10, 2014
Messages
10
I have
tblProducts - Where is my inventory list and
tblServices - where are my services

Also I have made an invoice form and a datasheet subform (orderDetails) where I enter/choose (using combo box) said services/products but I know only how to do it for one table ex. tblProducts. My question is can I make a drop down list for two tables? One column - ServiceName / ProductName
So I can choose a service or a product in the same order line.
Or do I have to join my services and products in the same table? Which would be really unpractical for my business.

Thanks in advance.
 
You can make a query that goes something like this:

Code:
 SELECT service_product_name 
 FROM (SELECT DISTINCT (servicename) As service_product_name FROM tblServicecs)
 INNER JOIN (SELECT DISTINCT (productname) As service_product_name FROM tblProducts)

Something like that maybe?
 
I get this: Syntax error in FROM clause
 
Code:
SELECT service_product_name   FROM (SELECT DISTINCT (servicename) As service_product_name FROM tblServices)  UNION (SELECT DISTINCT (productname) As service_product_name FROM tblProducts);
 

Users who are viewing this thread

Back
Top Bottom