Greetings Gurus
I need a little help with a listbox/lookup problem please.
The listbox contains a list of company names which, when a company name is clicked on, brings up a corresponding datasheet display of orders that company has placed. That datasheet contains a combobox of contacts.
What I am trying to achieve is that the combobox only displays a list of contacts for the particular company selected in the listbox.
My query currently states:
SELECT dbo_Contacts.ID, dbo_Contacts.ContactName, dbo_Contacts.Contactid
FROM (dbo_Company RIGHT JOIN dbo_Contacts ON dbo_Company.ID = dbo_Contacts.CompanyNo) INNER JOIN db
rders ON (dbo_Company.ID = db
rders.CompanyNo) AND (dbo_Contacts.ID = db
rders.User)
ORDER BY dbo_Contacts.ContactName;
but obviously doesn't work.
Can you help please?
I need a little help with a listbox/lookup problem please.
The listbox contains a list of company names which, when a company name is clicked on, brings up a corresponding datasheet display of orders that company has placed. That datasheet contains a combobox of contacts.
What I am trying to achieve is that the combobox only displays a list of contacts for the particular company selected in the listbox.
My query currently states:
SELECT dbo_Contacts.ID, dbo_Contacts.ContactName, dbo_Contacts.Contactid
FROM (dbo_Company RIGHT JOIN dbo_Contacts ON dbo_Company.ID = dbo_Contacts.CompanyNo) INNER JOIN db



ORDER BY dbo_Contacts.ContactName;
but obviously doesn't work.
Can you help please?