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

Multiple values in query criterion

Status
Not open for further replies.

48Highlander

Technical User
Feb 8, 2004
119
CA
I have a complex nested query. I want to use the 'bottom query' to select only certain records. To detemine the values for the query criteria, I have a multi-select list box. My code determines all of the values based on what the user has selected in the list box and assembles the values into a string in the form:

5 or 17 or 26

If only one item is selected, the string looks like:

5

The code than puts this string into an unbound text box on my form. The query criteria has the following in the first criteria row:

[Forms!frmReportSelector!txtSponsorType]

The query works fine if the user selects only one item in the list box. The query returns no records when more than one item is selected.

Anybody tell me how I should be passing this filter to the query?

Bill J
 
Read through the FAQs for this forum and come back if you need further assistance.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top