In case there is any question as to the term "criteria prompts," a better word would be parameters.:)
When you add paramters to a query, like this:
SELECT [tblTableName].ID, [tblTablename].FirstName, [tblTableName].LastName
FROM [tblTablename]
WHERE ((([tblTablename].LastName) Like [Enter the first letters of the last name:] & "*"));
No matter where you run the query from (directly, or from a form or report) the query will always prompt the user for input.
If the query refers specifically to a form field, as well, then unless that form is used to open the query, it will prompt for input.
When I create queries, as a rule, I do not put any parameters in the query. That way I can use the query from any form or report etc, without fear of prompting by the query.
I have a visual organization chart database, for example, that has about a dozen forms, and about 180 buttons, and each form and button calls the same report, with just one query. If I had put parameters in the query, it would prompt on some occassions when it was called from the report (from the button, and from the form).
I hard coded each button to call the one report with a few parameters supplied on each button. I have one button that supplies no parameters, so the entire organization shows up in the report.
Anyway, sorry for the confusion.
mmcdonal
|