Input for a parameter in a query

Z

zkheraj

Is it possible to get the input from the user and use it for a
parameterized query ?

e.g. if I get the year from the user , is it possible to use that input
for the parameter query
that the report is based on ?

Thanks
 
L

Larry Linson

Is it possible to get the input from the user and use it for a
parameterized query ?

e.g. if I get the year from the user , is it possible to use that input
for the parameter query
that the report is based on ?

Except for Queries being executed manually and directly, parameters can be
more trouble than they are worth. You can use them, but they are "picky"
when used from VBA code and may take extra work.

I find it much simpler to use a Form for the user to enter criteria, then
use VBA code to build the complete SQL to be used as RecordSource for a Form
or Report, or to build the WhereCondition argument for a DoCmd.OpenForm or
DoCmd.OpenReport.

Larry Linson
Microsoft Access MVP
 

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