Report based on date range 
Author Message
 Report based on date range

I have 2 variables dtmBegDt and dtmEndDt.  Each is tied to an Inputbox.
I pass these variables to a report's underlying query with the
OpenReport method's WHERE clause.

Is there some way I can pass these variables to a control on the report
header to yield "REPORT 1 - " & dtmBegDt & "TO " & dtmEndDt ???

As a newbie, I haven't had much luck in finding the solution.

Your solution or alternative method would be appreciated.

Thanks,

Don



Mon, 05 Dec 2005 10:33:14 GMT  
 Report based on date range
You could store the values in an invisible form control prior to opening the
report and then read them and display them.
You could pull the values from the Filter property. Try add a text box to
the report header with a control source of
    =Filter
If the variables are global, you could use code in your report to set the
caption of a label.

--
Duane Hookom
MS Access MVP

Quote:

> I have 2 variables dtmBegDt and dtmEndDt.  Each is tied to an Inputbox.
> I pass these variables to a report's underlying query with the
> OpenReport method's WHERE clause.

> Is there some way I can pass these variables to a control on the report
> header to yield "REPORT 1 - " & dtmBegDt & "TO " & dtmEndDt ???

> As a newbie, I haven't had much luck in finding the solution.

> Your solution or alternative method would be appreciated.

> Thanks,

> Don



Mon, 05 Dec 2005 13:48:43 GMT  
 Report based on date range

Quote:

>I have 2 variables dtmBegDt and dtmEndDt.  Each is tied to an Inputbox.
>I pass these variables to a report's underlying query with the
>OpenReport method's WHERE clause.

>Is there some way I can pass these variables to a control on the report
>header to yield "REPORT 1 - " & dtmBegDt & "TO " & dtmEndDt ???

If the values are in text boxes on the form, then the text
box in the report header can retrieve them using syntax
like:

="REPORT 1 - " & Forms!theform.txtBegDt & "TO " &
Forms!theform.txtEndDt

--
Marsh
MVP [MS Access]



Mon, 05 Dec 2005 22:22:31 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Crystal Reports 8.5 date range parameter field - record selection that includes null date range

2. Report Output based on a range of dates

3. Calling values from table based on date range criteria

4. Lookup based on date range in unlinked table

5. PROBLEM - Selecting records based on Date Range

6. SQL Base date vs VB Base date

7. Using variables for date ranges in a report

8. Date range parameter on a report

9. Including a Parameter Field (Date Range) in a report

10. Printing a date range parameter on the report header

11. Schedule Report with Last Month's Date Range

12. Printing Parameter Date Range on Report

 

 
Powered by phpBB® Forum Software