Search entire table or query

  • Thread starter Thread starter maggie
  • Start date Start date
M

maggie

Is there a way to write a parameter query that searchs all
the fields in a table or a query and returns all the
records that match?
 
You can do this by applying the same criteria to every field in the query. You
have to do an "OR" query.

In SQL.

SELECT <YourListOfFields>
FROM TheTable
WHERE FieldA = [Find This] Or
FieldB = [Find This] Or
FeildC = [Find This]


If you are doing this in the query grid, you need to stair step the criteria to
get the or effect.

Field: FieldA FieldB FieldC
Criteria: [Find this]
Criteria: [Find this]
Criteria: [Find this]

As long as the parameter is identical from line to line, you will only have to
enter it one time. Note that the fields all have to be the same type; all text
or all dates or all numbers.
 
Yes! it worked using the stair step approach.
THANKS!!
-----Original Message-----
You can do this by applying the same criteria to every field in the query. You
have to do an "OR" query.

In SQL.

SELECT <YourListOfFields>
FROM TheTable
WHERE FieldA = [Find This] Or
FieldB = [Find This] Or
FeildC = [Find This]


If you are doing this in the query grid, you need to stair step the criteria to
get the or effect.

Field: FieldA FieldB FieldC
Criteria: [Find this]
Criteria: [Find this]
Criteria: [Find this]

As long as the parameter is identical from line to line, you will only have to
enter it one time. Note that the fields all have to be the same type; all text
or all dates or all numbers.
Is there a way to write a parameter query that searchs all
the fields in a table or a query and returns all the
records that match?
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top