query on two fields

  • Thread starter Thread starter Wally Steadman
  • Start date Start date
W

Wally Steadman

I hope I can explain this good enough to understand.

I have a table and two of the fields are FROM and TO

Is there a way to have a query check both for a certain
item

Example:

FROM TO
Bob Fred
Fred Steve
Dave Fred
Bob Steve
Steve Bob

Is there a way to query it where it will show records that
contain Fred in the FROM or TO cells? I am building a
logging database and want to be able to query from both at
the same time. Any information would be appreciated.
Thanks in Advance
 
Hi Wally,

This is easy. In the query design grid, put
"Fred"
in the first criteria cell beneath the FROM field, and
"Fred"
again in the *second* criteria cell beneath TO. That will return all
records that are either to or from Fred.

To save typing the name twice each time, you can make it a parameter
query. Instead of putting "Fred" in the two criteria cells, put
something like
[Enter name to search for]
(exactly the same in both cells). Then when you run the query it will
prompt you for the name.
 
Back
Top