From: rcs on
I can write a query that prompts one field for a specific value, but would
like user to enter multiple criteria

Example - Lot numbers range from 1 to 140

transportation back to original consignor is provided by one individual, he
is picking up lots 2, 50, 76 and 32 so I want to have these values on the
load out ticket

How do I allow for nonconsecutive values to be entered?
From: John Spencer on
You could use a where clause that looked like the following. Replace
LotNumber with the name of your field.

WHERE Instr(1,"/" & [Enter lot numbers separated by slashes 1/2/53] & "/","/"
& [LotNumber] & "/") > 0


In query design view that would probably look like:
Field: Instr(1,"/" & [Enter lot numbers separated by slashes 1/2/53] & "/","/"
& [LotNumber] & "/")

Criteria: > 0

A better solution would involve VBA and building the query string (or at least
the where portion of the query) after the user enters choices on a form.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

rcs wrote:
> I can write a query that prompts one field for a specific value, but would
> like user to enter multiple criteria
>
> Example - Lot numbers range from 1 to 140
>
> transportation back to original consignor is provided by one individual, he
> is picking up lots 2, 50, 76 and 32 so I want to have these values on the
> load out ticket
>
> How do I allow for nonconsecutive values to be entered?