combo box row source query operator

J

JohnLute

I have a combo box that queries supplier names and their ID's. Here's the row
source:

SELECT tblSupplierNames.txtSupplierName, tblSupplierIDs.txtSupplierID FROM
tblSupplierNames INNER JOIN tblSupplierIDs ON
tblSupplierNames.txtSupplierName = tblSupplierIDs.txtSupplierName GROUP BY
tblSupplierNames.txtSupplierName, tblSupplierIDs.txtSupplierID ORDER BY
tblSupplierNames.txtSupplierName, tblSupplierIDs.txtSupplierID;

Some suppliers do NOT have an ID. What operator(s) do I use for the above so
that the combo box queries all supplier names regardless if they have an ID
or not?

THANKS A BUNCH!
 
G

Graeme Richardson

Hi John,

Modify the query so that your INNER JOIN is a LEFT JOIN:

SELECT tblSupplierNames.txtSupplierName, tblSupplierIDs.txtSupplierID FROM
tblSupplierNames LEFT JOIN tblSupplierIDs ON
tblSupplierNames.txtSupplierName = tblSupplierIDs.txtSupplierName GROUP BY
tblSupplierNames.txtSupplierName, tblSupplierIDs.txtSupplierID ORDER BY
tblSupplierNames.txtSupplierName, tblSupplierIDs.txtSupplierID;


HTH, Graeme
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top