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

Parameter Query where parameter is selected from listbox 2

Status
Not open for further replies.

Simon22

Technical User
Feb 1, 2001
54
CA
Hi all!
Firstly, thanks to all the good people who have answered my numerous questions :)

Second, my problem: I would like to query my employee and employee_type (eng, adm, sci ect..) using a parameter to tell the query what kind of employee records I want returned. For example: list all of the employees who have employee_type = eng (engineer). The employee_type be chosen on a form via a listbox. I would like the user to highlight the employee type or types that they want to return records for and have that parameter/s sent to the parameter query.

Can anyone tell me how to pass the listbox value through to the parameter box on my query?
 
Hi!

In the Criteria row of the query on your employee_type field, right click, choose "Build", doble-click thru the forms-part, to find the right form. There you double-click on the list.

This should work if your criteria is in the listbox first column if not, you'l have to specify like this

forms!frmYourFormName!lstYourList.Column(1)

to get the second column of the selected row.

Hope this helps

Roy-Vidar
 
Thank you very much. I'll give it a try!
 
Hi. This is very helpful to me as well, but I am wanting to tell the query what parameter to use based on a lookup table. The criteria is not in the first field however, but the third. I am not sure how set this up. Can you help??

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top