I'm running the query as a form but I need to show a selection. I want to
select several names varying from 2 to 12 and show them on the report. How
can I write the criteria in the query to select the names I want?? I'm
trying [name?] Or [name?] on the criteria field but its not working like
this. Excuse my ignorance.
So you want the user to be able to type several names, and have it
search for the entered names using OR logic? This should be easier
than it is, unfortunately!
One suggestion would be to have twelve unbound textboxes, Name1 to
Name12 say, on a Form; and use a criterion of
IN ([Forms]![YourForm]![Name1], [Forms]![YourForm]![Name2],
[Forms]![YourForm]![Name3], <etc>)
in your query. The other suggestion would be to write VBA code to poll
through the form and build up a SQL string in code, and then set that
string as the report's Recordsource.
John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps