Simple Parameter Query (multiple entries) ?

  • Thread starter Thread starter Martyn
  • Start date Start date
M

Martyn

I've got a parameter query that asks for an Order No.
But occasionally the user wants to be able to use the query to report on two
(or more) Orders at a time.
I'd like the parameter query prompt to accept him entering whatever order
Numbers he wants.
ie if he entered them, separated by commas, (eg if he entered 'S1234, S3456,
S5678') it should run an OR query with those three Order Numbers.
But of course it won't accept this.
This doesn't seem an unreasonable thing to want, but I can't fins any help
anywhere.

Martyn
 
This should work well as long as you realize that ORDER_NUMBER 123 will
report if the user enters 12340.

--
Duane Hookom
MS Access MVP


Martyn said:
Use the technique described in The Access Web article:

http://www.mvps.org/access/forms/frm0007.htm
Thanks for your time, but that looks a little too complicated for me !

I managed to get it working fine with an extra column in my query as
follows;

InStr([Enter Number],[ORDER_NUMBER])
with a criterion of >0

i.e. it asks you to enter the Order Number ('[Enter Number]' parameter)
which can now be a comma separated list, then checks to see if any of these
items are in ('instr()') the ORDER_NUMBER field.

I was looking to use the 'in()' function but the help on that is rubbish!

Works lovely now.
 
Back
Top