query on two fields

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
 
J

John Nurick

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.
 

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

Top