Query parameters

  • Thread starter Thread starter Bobrase
  • Start date Start date
B

Bobrase

trying to select part numbers using a report driven by a
qry. Only qry parameter is [Which part ?]. This works
fine for a single part - but i cannot get it to work for
a range of parts. Tried using >= "part number" AND
<= "part number" but this returns nothing. Also tried
= "part number" OR "part number" which also return
nothing. Any suggestions ??

Thanks
 
If these are numeric part numbers, try something like

WHERE (PartNumber>=[Enter lowest part number])
AND (PartNumber<=[Enter highest part number])


WHERE PartNumber IN ([Enter comma-separated list of part numbers])

With a text field, you need to quote the parameterised values:

WHERE PartNumber>="[Enter lowest part number]"

and to be aware that <= and >= don't always sort text the way you first
expect.

trying to select part numbers using a report driven by a
qry. Only qry parameter is [Which part ?]. This works
fine for a single part - but i cannot get it to work for
a range of parts. Tried using >= "part number" AND
<= "part number" but this returns nothing. Also tried
= "part number" OR "part number" which also return
nothing. Any suggestions ??

Thanks
 
Bob,

The query John suggested will work, but if you are not familiar with the
SQL pane, simply placing

Between [Enter first parameter] And [Enter second parameter]

as a criteria for the field you are querying would work in the Query design
view.

Hope this helps

John
 
Back
Top