Parameters in Queries

J

Jdaw94

How do I make it so when a query is opened a dialog pops up asking for an
input or Parameter??
 
M

Marshall Barton

Jdaw94 said:
How do I make it so when a query is opened a dialog pops up asking for an
input or Parameter??


Just use whatever you want to appear in the pop prompt as a
field name in the query. Eg. [Enter your name]
 
J

John W. Vinson

How do I make it so when a query is opened a dialog pops up asking for an
input or Parameter??

Put the desired prompt in square brackets:

[Enter last name:]

on the criteria line.

Better - you'll want to move to this eventually - is to use an unbound Form to
collect your parameters. The user would never open or even see the query. The
query's criteria would resemble
=[Forms]![YourFormName]![txtStartDate]

and you would have code (perhaps a command button) on the form to open a
Report or another Form based on the query.
 

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