Picking up dates from a parameter

  • Thread starter Thread starter CAM
  • Start date Start date
C

CAM

Hello,

When a user print preview a report I would like to pick up the dates from
report parameter query. For example on a date field: Between [Enter
Beginning Date] And [Ending Date] I like to pick up the Beginning Date and
the Ending Date and put those dates on the report. For example Begining
Date - 04/01/2006 - Ending Date 04/30/2006. In the report I want to put
04/01/2006 - 04/30/2006 on the report header. Is this possible? Any tips
will be appreciated. Thank you in advance.
 
The best tip is to never use parameter prompt queries. You should be using
references to controls on forms so your criteria would be:

Between Forms!frmDates!txtBegin and Forms!frmDates!txtEnd

You can set your control source in your report to something like:
="Dates Between " & [Enter Beginning Date] & " and " & [Ending Date]
--
Duane Hookom
MS Access MVP


If you don't want to use controls on forms, just use something like:
="Dates Between " & Forms!frmDates!txtBegin & " and " &
Forms!frmDates!txtEnd
 
Hello,

When a user print preview a report I would like to pick up the dates from
report parameter query. For example on a date field: Between [Enter
Beginning Date] And [Ending Date] I like to pick up the Beginning Date and
the Ending Date and put those dates on the report. For example Begining
Date - 04/01/2006 - Ending Date 04/30/2006. In the report I want to put
04/01/2006 - 04/30/2006 on the report header. Is this possible? Any tips
will be appreciated. Thank you in advance.

Add an unbound text control to the report header.
Set it's control source to something like:
= "For sales between " & [Enter Beginning Date] " and " [Ending date]

The text within the brackets must be identical to the bracketed text
in the query parameter. You can substitute your own text for any of
the text within the quotes.
 
Hello,

When a user print preview a report I would like to pick up the dates from
report parameter query. For example on a date field: Between [Enter
Beginning Date] And [Ending Date] I like to pick up the Beginning Date and
the Ending Date and put those dates on the report. For example Begining
Date - 04/01/2006 - Ending Date 04/30/2006. In the report I want to put
04/01/2006 - 04/30/2006 on the report header. Is this possible? Any tips
will be appreciated. Thank you in advance.

Add an unbound text control to the report header.
Set it's control source to something like:
= "For sales between " & [Enter Beginning Date] " and " [Ending date]

The text within the brackets must be identical to the bracketed text
in the query parameter. You can substitute your own text for any of
the text within the quotes.

Whoops!
That should have read:
= "For sales between " & [Enter Beginning Date] & " and " & [Ending
date]
 
Back
Top