Multple field Search prompt

  • Thread starter Thread starter Hmmm
  • Start date Start date
H

Hmmm

I have a series of fields that I want to search

so say I have fistname middlename lastname

I want a a single prompt so that if I type in Rich

it will pick it up if it is any 3 of those fields
even if it is a partial match such as Richard or Woolrich


please help
 
How about something like the following?

SELECT FirstName, MiddleName, LastName
FROM TABLEName
WHERE FirstName Like "*" & [Match What?] & "*"
OR MiddleName Like "*" & [Match What?] & "*"
OR LastName Like "*" & [Match What?] & "*"
 
I have a series of fields that I want to search

so say I have fistname middlename lastname

I want a a single prompt so that if I type in Rich

it will pick it up if it is any 3 of those fields
even if it is a partial match such as Richard or Woolrich


please help

Put a criterion of

LIKE "*" & [Enter search term:] & "*"

on the Criteria line under each field... but put it on *separate
lines* of the query grid so that it uses OR logic.

When you run the query you'll be prompted Enter search term: (or
whatever you type in the brackets), only once if you have exactly the
same criterion on all three fields; it'll search all three fields and
return a record if any of them matches the criterion.
 
Back
Top