query with range

ebasta

Registered User.
Local time
Today, 16:58
Joined
Sep 2, 2004
Messages
33
Hi,

i have a form to search data inserting data in text fields. I want to let users specify a range to search specify data with range (e.g. marine area from 200 ha to 1000 ha)
and show results in a list box.

my idea is to create a selection query where criteria are
between Forms!SearchForm!MarineAreaFrom and Forms!SearchForm!MarineAreaTo

My problem is that I have severals fields where you can put your request and so I need a sort of iif statement to specify, I tried but with no success!

So, I NEED HELP!
 
You may have to actually assemble the query in code based on the form fields used. You would need a string variable like strSelect containing the basic query and another string variable like strWhere. Put the range info info into this variable and append it to strSelect. Make the resulting query the record source of a multifield list box or a datasheet form.

You could also use hidden text boxes on the form and copy the appropriate range data into them from the text boxes that the user used. Use the build feature to add it to the query criteria. So the query will always use the same hidden text boxes to get the range.
 

Users who are viewing this thread

Back
Top Bottom