Query Multiple Fields

  • Thread starter Thread starter Cecil
  • Start date Start date
C

Cecil

How do I query multiple fields in the same table?

Example:
In the query design.
In a single field inputting the Criteria:
Like"*"&[Enter Search Data]&"*"
This works for one field.

How can I query more than one field at a time?

Thanks

Cecil
 
Have you tried to setup PARAMETERS in your query?
In query design mode, choose Parameters... in menu Query. Name any number of
parameters as the number of fields you want to 'query'. Don't forget to
setup the same datatype of each field.
Click OK to return to query design. In the Criteria row of each field you
had setup a parameter, type the name you gave to it between brackets ( Like
"*" & [param1] & "*" or = [paramX] )
When you run the query, Access will ask you to enter the value for each
parameter.

Sidnei
 
How do I query multiple fields in the same table?

Example:
In the query design.
In a single field inputting the Criteria:
Like"*"&[Enter Search Data]&"*"
This works for one field.

How can I query more than one field at a time?

Put the exact same criterion on the Criteria line under all of the
fields that you want to search. If you put the criterion on the same
row of the query grid Access will use AND logic and return the record
only if *all* of the fields contain the value entered; you can instead
put the criteria on separate lines to use OR logic, which will find
the record if *any* of the fields contain the value.
 
Back
Top