Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering the contents of a combo box.

Status
Not open for further replies.

n2nuk

IS-IT--Management
Dec 24, 2002
190
GB
Hi there,

I am having difficulty with the following and would appreciate your advice...

I have a form with 2 combo boxes the first combo list companies, the second combo lists the locations. As one company can have many locations I have created a new column on the locations table (company_ref) that references the company_id from the companies table.

What I want to do is filter the location combo box to only list locations that belong to the company combo box.

Any ideas??

Thanks

Naz

 
Naziern,
I think what you would do is make the location combo box get data from a query based on the locations table. In this query you would set a criteria for the company_ref field to equal to the company ID in the control on the open form. Something like: company_ref = forms!formname!(control for comp ID).

I hope this helps.
HCEONETMAN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top