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 MikeeOK 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 a List Box

Status
Not open for further replies.

cjspsx

Technical User
Nov 12, 2003
1
US
I need to base a query on multiple selections of a list box. I have my list box based on a table. I have a query with Forms!frmName!lstboxName in the criteria. I have a button on the form linked to the query so that when selections are made, I can run the query. The problem is that when the query is run, there are 0 records. The criteria isn't being passed somehow. What am I doing wrong?

Thanks,
cj
 
I think you actually need the ItemData property. The ListBox Name just returns the name of the ListBox, so your query is looking for that name and not the selections. Also, you might need to create an array of the selections to set the query criteria.

I have some code that does that, so let me know if you need it.


DreamerZ
simplesolutions@prodigy.net
[ignore][/ignore]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top