query filtering (1 Viewer)

reptar

Registered User.
Local time
Today, 11:13
Joined
Jul 4, 2005
Messages
32
Hi, i have a table "tbl_details" with fields "first_name" & "last_name". I have a query "qry_details" which contains the two fields. I would like to create a search form with first_name & last_name textfield entries that when the search button is clicked, "qry_details" comes up with the filtered results. I need it so that if a textfield is left blank on the search form it wont matter in the query.
 

WayneRyan

AWF VIP
Local time
Today, 19:13
Joined
Nov 19, 2002
Messages
7,122
Hi Reptar,

If you want a query to use your form controls as criteria, just look at one
of the lower rows in the Query's Design View --> Criteria

The simplest way is to just put:

Like "*" & Forms!YourForm!LastName & "*"

You can also look in the Sample Database section here. There are lots of
examples of Search Forms.

Wayne
 

Users who are viewing this thread

Top Bottom