Daniel, it is all in the criteria of the WHERE part.
Where you see "Apple" replace it with [ColumnA Item] and a
parameter box will appear when the query runs asking for
the ColumnA Item. Or for all 3 if you replace all three.
Use the brackets. What is between the brackets is what
appears on the parameter box. So, use what you need
between the brackets. The SQL should look something like
this;
SELECT ColumnA, ColumnB, ColumnC
FROM TableName
HAVING (((ColumnA)=[ColumnA Item]))
OR (((ColumnB)=[ColumnB Item]))
OR (((ColumnC)=[ColumnC Item]));
Once you start seeing how this all develops it becomes
easier. If it's possible, it doesn't hurt to "experiment"
with queries to see how they work with different criteria,
totals, groupings, etc.
Good luck.
*** John
-----Original Message-----
John,
Thanks for the help, but I still have one more question for you!
The fact of the matter is that I want the user of the
query to specify what to search for. So as such, how can
I modify your SQL query so that a msgbox asks the
user "Search for what?" and then the returned value is
used as the search parameter in the query?
Thank you once again. Your help is much appreciated.
Daniel
*****************************************
Daniel, you can do this from the query design.
1) go to the query window of the db
2) select NEW
3) for the New Query select Design View
4) from the Show Table list select the table you want
to query
5) place your cursor next to the table you selected and
right click your mouse
6) select SQL View
7) in "white" area you'll see the word SELECT and FROM
8) type in (I removed the table name from most of the
statement since all the info is coming from one table)
SELECT ColumnA, ColumnB, ColumnC
FROM TableName
WHERE (((ColumnA)="Apple")) OR (((ColumnB)="Apple")) OR
(((ColumnC)="Apple"));
9) place your cursor on the blue title bar and right
click and select Query Design
This will put you back to the design view and you'll see
how the table is being worked by the SELECT statement you
did.
Hope this is what you are looking for.
*** John
.