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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query based on selection in combobox 1

Status
Not open for further replies.

rmh3619

Technical User
Joined
May 29, 2006
Messages
29
Location
NL
Hello all,

I have created a form with two combo boxes, one is named "customers" the other "reported_by".

I have created a query named "list_callers_by_company" which is populated by the folowing code in the row source
SELECT "*" as z from [list_callers_by_company] union select [List_callers_by_company].[caller_name] FROM [List_callers_by_company];

the query also contains a field named "company"

I want the reported_by combo box values changed so that only values are displayed where the company field of my query equals the company combo box value on the form.

Any help is greatly appreciated!
 
search the forum for 'cascading combo box' and you will find plenty of information on what you are trying to accomplish.

HTH


Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases:
The Fundamentals of Relational Database Design
Understanding SQL Joi
 
i changed the row source code into:

SELECT "*" as z from [list_callers_by_company] union select [List_callers_by_company].[caller_name] FROM [List_callers_by_company] where [list_callers_by].[company]=[forms]![menu_incident_management]![company];

but now my combo box is not even populated with anything. what am I doing wrong here?
 
you changed which combo boxes row source to that query?

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top