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

Base query on listbox in Access

Status
Not open for further replies.

BrianWen

Programmer
Jun 8, 2009
102
DK
Is there a way to use a listbox control, that allows multiple selections, in a query?

I mean, say you have a listbox with values 1,2,3,4,5 and it's possible to select one or more of those.

Then I have a table used in a form (via a query), which contains a field number that ranges from 1-5 in each record.

OK, I'd like to set up a critiria on the number field in that query, so that number has to be equal to a selected value in the listbox, meaning it would only take records where number = 1 or 3 or 5 if 1, 3 and 5 is selected on the listbox.

Is that possible?

Any help will be appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top