using parameter in criteria box

  • Thread starter Thread starter Kaihea
  • Start date Start date
K

Kaihea

I need help figuring out the proper WHERE clause to use to
allow a parameter to "search" multiple fields. The
parameter provided by the user would match up to six
fields...I just need to figure out how to keep from using
six different criteria boxes.

Does any of this make sense??? I've been eye-ball deep in
this for nearly four hours...help!
 
If you are using the same parameter against six field then put the same
parameter (Exactly) against each of the fields.

SAMPLE SQL

SELECT *
FROM TableName
WHERE Field1 = [Find This]
OR Field2 = [Find This]
OR Field3 = [Find This]
OR Field4 = [Find This]
OR Field5 = [Find This]
OR Field6 = [Find This]

Note that this finds what you are looking for as long as there is a match in at
least one of the fields.

If you are doing this in the query grid, then make sure that you put the [Find
This] on separate rows in the criteria section of the grid.
 
Back
Top