Displaying a Date Prompt/Criteria in Report Header

  • Thread starter Thread starter Nancy
  • Start date Start date
N

Nancy

I have a report that I set up with a date range prompt (enter beginning date
and ending date) as criteria to limit my data. I would like to display this
date range in the header of my report each time its run so that the date
range is easily identified. I have used a text box for the display of other
fields before, but in this case there is not actually a field name to enter
in the expression. Does anyone know how I would enter the date criteria in
the expression? Following is an example of what I have done in the past for
other text boxes when there is a field name involved, but there is not actual
field name in my date prompt.

=[Field Name]&†“&[Field Name]

Thanks for any light you may be able to shed on this and hope it makes sense.
Nancy
 
IMO, don't ever use parameter prompts. Use controls on forms for all user
interaction. Then your control source would be:
="Between " & Forms!frmCrit!txtStart & †AND “ & Forms!frmCrit!txtEnd

However, you can use your prompts in the same way you would use a field name:
="Between " & [Enter Start Date] & " and " & [Enter End Date]

If your report doesn't return any records, the second solution will fail
miserably ;-)


However
 
Thank you! I'll make the changes to my report and query and hopefully it will
work. I appreciate your time.

Nancy

Duane Hookom said:
IMO, don't ever use parameter prompts. Use controls on forms for all user
interaction. Then your control source would be:
="Between " & Forms!frmCrit!txtStart & †AND “ & Forms!frmCrit!txtEnd

However, you can use your prompts in the same way you would use a field name:
="Between " & [Enter Start Date] & " and " & [Enter End Date]

If your report doesn't return any records, the second solution will fail
miserably ;-)


However
--
Duane Hookom
Microsoft Access MVP


Nancy said:
I have a report that I set up with a date range prompt (enter beginning date
and ending date) as criteria to limit my data. I would like to display this
date range in the header of my report each time its run so that the date
range is easily identified. I have used a text box for the display of other
fields before, but in this case there is not actually a field name to enter
in the expression. Does anyone know how I would enter the date criteria in
the expression? Following is an example of what I have done in the past for
other text boxes when there is a field name involved, but there is not actual
field name in my date prompt.

=[Field Name]&†“&[Field Name]

Thanks for any light you may be able to shed on this and hope it makes sense.
Nancy
 

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

Back
Top