Query by form in access 2003

L

lemansGT

I am using Access 2003 and have an unbound form with 8 different fields where
users can search different items. For instance, I want to search an order
form by different ways, say I would have an Order#, they would enter in the
Order# to search and it would bring up the frmOrders screen displaying that
order. I have done something like this before but not with 8 different ways
- how do you make sure the user puts something in the correct box? Also,
does someone have a sample statement that I would put in the Search box - I
am assuming I would need some kind of SQL statement?
 
L

lemansGT

Thanks for the input and it would work good but here is my opportunity -
right now, all of the orders come up on a continous form, which takes a time
to load; the users pick one and double click on it to bring up more detailed
information about that particular record (dates, followup info, etc). I was
trying to add a form before the main form where it would automatically come
up and they could just search for a particular record(s) in the database.
From the search screen, I thought about bringing up the continous records
form, then they could drill down on it from there, and bring up the final
form. Thoughts? Thank you.
 
A

Allen Browne

Yes that makes sense.

As you can probably tell from the screenshot, the example search form is a
continuous form. And you can use the Click (or Dbl Click) event to bring up
your normal editing form to that record if you wish.
 
L

lemansGT

Thank you very much for this - I actually made a pre screen and used it that
way. One other question on this - once the data is filtered, is there any
way to apply another filter inside that criteria? Say you get all the
entries from one date to another, is there a way you could filter it down
more? I know when you take the filter off, then yu get all the records again
- just wondering. Thank you again.
 
A

Allen Browne

Try appending to the existing filter string:

Dim strFilter As String

If Me.FilterOn Then
strFillter = Me.Filter & " AND (City = 'Springfield')"
Else
strFillter = "City = 'Springfield'"
End If

Me.Filter = strFilter
Me.FilterOn = True
 
Top