parameters

J

JoAnn

Hi,

how can I get the parameters to print on a report so the reader knows what
dates that information covers without having to enter the dates twice?

Thanks!
 
D

Duane Hookom

IMO, your users should never be hit with parameter prompts. Consider using
controls on forms for all user interaction. You can then reference the
controls in text boxes on your report:
Control Source: =Forms!frmRptCrit!txtFromDate

Duane Hookom
MS Access MVP
 
J

JoAnn

Thanks - I am interested in using a form instead of parameters, but I'm not
sure how to do that. Can you expand on that? (thanks)
 
J

JoAnn

Thanks Clifford
--
JoAnn


Clifford Bass via AccessMonster.com said:
Hi JoAnn,

Just use the parameter as the control source in your report. So if you
have [Enter Start Date:] as a parameter, you can set the control source of a
text box to [Enter Start Date:]. Or you can use it as part of an expression:
=[Enter Start Date:] & " through " & [Enter End Date:].

Clifford Bass
Hi,

how can I get the parameters to print on a report so the reader knows what
dates that information covers without having to enter the dates twice?

Thanks!
 
D

Duane Hookom

All user interaction should be managed through forms. IMO, don't allow users
to ever see your database window or tables.

Assuming you have a report to open filtered based on start and end dates,
you can add a couple text boxes on a form for the user to enter (or select
using a calendar control). Name the text boxes txtStart and txtEnd. You can
then add references to these controls in your report's record source query.
The criteria under your date field might look something like:
Between Forms![YourFormNameHere]!txtStart And
Forms![YourFormNameHere]!txtEnd

I prefer using the Where Condition of the DoCmd.OpenReport method.

To display the values of the text boxes, add a text box on your report with
a control source like:
="Between " & Forms![YourFormNameHere]!txtStart & " And " &
Forms![YourFormNameHere]!txtEnd

Duane Hookom
MS Access MVP

JoAnn said:
Thanks - I am interested in using a form instead of parameters, but I'm
not
sure how to do that. Can you expand on that? (thanks)
 

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