Hi guys,
After reading the faq regarding this, I'm having some issues with linking the first two drop boxes on the form I'm creating.
The form takes info from two tables:
Company:- companyType, companyArea, PostalCode, Company Name
Contact:- Salutation, Forename
I have two drop down list boxes, the first I want to list the CompanyType, and the second I want to list the CompanyArea.
I have put the following in the Row Source:
cboCompanyType:- SELECT Company.CompanyID, Company.CompanyType FROM Company ORDER BY Company.CompanyType;
cboCompanyArea:- SELECT Company.CompanyArea, Company.Type, FROM Company WHERE (((Company.CompanyID)=[Forms]![ContactLookup]![cboCompanyType])) ORDER BY Company.CompanyArea;
SELECT Company.CompanyArea, Company.CompanyID, Company.Name FROM Company WHERE (((Company.CompanyID)=[Forms]![ContactLookup]![cboCompanyType])) ORDER BY Company.CompanyArea;
I get an erro when clicking the second box, and I'm not sure why. I'm sure it's a simple issue so any help would be appreciated!
Also, a number of companies fall under the same area or type; how do I limit the number of each type displayed to 1, instead of having multiple types of the same name listed for each company?
Thanks guys,
Antoni
After reading the faq regarding this, I'm having some issues with linking the first two drop boxes on the form I'm creating.
The form takes info from two tables:
Company:- companyType, companyArea, PostalCode, Company Name
Contact:- Salutation, Forename
I have two drop down list boxes, the first I want to list the CompanyType, and the second I want to list the CompanyArea.
I have put the following in the Row Source:
cboCompanyType:- SELECT Company.CompanyID, Company.CompanyType FROM Company ORDER BY Company.CompanyType;
cboCompanyArea:- SELECT Company.CompanyArea, Company.Type, FROM Company WHERE (((Company.CompanyID)=[Forms]![ContactLookup]![cboCompanyType])) ORDER BY Company.CompanyArea;
SELECT Company.CompanyArea, Company.CompanyID, Company.Name FROM Company WHERE (((Company.CompanyID)=[Forms]![ContactLookup]![cboCompanyType])) ORDER BY Company.CompanyArea;
I get an erro when clicking the second box, and I'm not sure why. I'm sure it's a simple issue so any help would be appreciated!
Also, a number of companies fall under the same area or type; how do I limit the number of each type displayed to 1, instead of having multiple types of the same name listed for each company?
Thanks guys,
Antoni