View Full Version : Multiple criteria


bmwilson
02-04-2002, 05:27 PM
Im sure this is simple but i cant figure it out.

All i want to do is have a query that returns a range of values specified by a user.

I have set up the basic query with criteria of [Enter length range] this brings up an inputbox and you can type in one number to query. What i want is for the user to be able to type something like 13500-14500 and the query retrieve all records with length between 13500 and 14500.

It also needs to be able to have a single input (like it does at the moment).

http://www.access-programmers.co.uk/ubb/smile.gif
Ben

Jack Cowley
02-04-2002, 05:55 PM
In your criteria field enter Between [Enter Start Length] And [Enter End Length]. For a single range enter the same value at both prompts.

bmwilson
02-04-2002, 06:04 PM
thanks Jack... i felt embarassed asking that question... lol

if the user types in nothing, is there a way of showing all records?

RichB
02-05-2002, 07:36 AM
Try this. It work for me.

Like "*" & [Enter Start Length] AND [Enter End Length] & "*"


[This message has been edited by RichB (edited 02-05-2002).]

bmwilson
02-05-2002, 12:29 PM
Rich.... that gave me an error message saying "there was an error executing the command"...

It shouldnt matter about the blank entry... ill just have to make our salesmen understand this... lol... does anyone have a large stick so that i can beat it into them?

(No offense to any salesmen here http://www.access-programmers.co.uk/ubb/wink.gif )

Ben