CharlesWhiteman
Registered User.
- Local time
- Today, 12:36
- Joined
- Feb 26, 2007
- Messages
- 421
I have a main table 'Companies' and a Table 'Contacts' Linked by CompaniyID
I have created a list box which looks up the contacts table and displays them as a list box in the main 'Company' Form.
How to I get the list box to only show contact names where the companyID matches?
I have been looking at SQL WHERE in my statement but can't get it to work; example below:
SELECT QryContacts.ContactName, QryContacts.JobTitle, QryContacts.EmailAddress, QryContacts.CompanyID FROM QryContacts WHERE QryContacts.ID equals "[Forms]![FrmQryCompaniesold]![CompanyID]
I have created a list box which looks up the contacts table and displays them as a list box in the main 'Company' Form.
How to I get the list box to only show contact names where the companyID matches?
I have been looking at SQL WHERE in my statement but can't get it to work; example below:
SELECT QryContacts.ContactName, QryContacts.JobTitle, QryContacts.EmailAddress, QryContacts.CompanyID FROM QryContacts WHERE QryContacts.ID equals "[Forms]![FrmQryCompaniesold]![CompanyID]