Sure you can do that. The easies way is to create a table of the last names
selected, and join that table into the query definition.
If you write your own SQL, you can create a string something like
where LastName in ("Smith", "Jones", "Brown")
Good luck
"Matthew Braumiller" <ma**@dwminc.com> wrote in message
news:t5********************************@4ax.com.. .Greetings:
Is it possible to write a query which allows the user to specify
multiple criteria for the records to be returned?
What I mean is, say I have a table with fields of "A", "B", and "C",
which containts 5,000 records. Let's say that field A is a last name
field. Is it possible to write a query where the user can input
multiple last names (3 on one use, 7 on another, 13 on the next, ect.)
so that the records returned match the last names specified?
Thanks for you time!
I don't think I have explained myself very well. I'm sorry for the
confusion. I am trying to write a query for a report.
I have a table with fields A, B, C, D, E with 5,000 records.
Field A is a text field used for last name.
My users need to be able to pull up a report based on a variable
number of last names. In other words, they might need to pull up 16
last names on one report and 4 on the next; 32 on the one after that
and so on.
Is there a way to write the query so that the last statement
SELECT tblCust.*, tblCust.A
FROM tblCust
WHERE (((tblCust.A)=[Enter Last Name]));
allows the user to specify multiple last names?
I hope this is more clear.
Thanks!