Hi,
I have a report which is run on a union query based on another query.
The second query has the following parameter for a date criteria
between [Enter Start Date] and [Enter To Date]
I would like to show this on the Report Header. I have created a text box on the Header Band called DateRange and tried the following code but it does not work - tells me it cannot find the field [Enter Start Date].
Is this possibly because the parameter is not in the initial query but in the second query?
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
Let Report_AllocatedCosts.DateRange = [Enter Start Date]
End Sub
I also tried to do it differently ....
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
Let Report_AllocatedCosts.DateRange = "From " & [Enter Start Date] & " and " & [Enter To Date]
End Sub
and even ....
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
Let Report_AllocatedCosts.DateRange = "From " & Cstr([Enter Start Date]) & " and " & CStr([Enter To Date])
End Sub
But am having absolutely no luck.
Any suggestions would be appreciated.
Thanks
Rowena
I have a report which is run on a union query based on another query.
The second query has the following parameter for a date criteria
between [Enter Start Date] and [Enter To Date]
I would like to show this on the Report Header. I have created a text box on the Header Band called DateRange and tried the following code but it does not work - tells me it cannot find the field [Enter Start Date].
Is this possibly because the parameter is not in the initial query but in the second query?
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
Let Report_AllocatedCosts.DateRange = [Enter Start Date]
End Sub
I also tried to do it differently ....
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
Let Report_AllocatedCosts.DateRange = "From " & [Enter Start Date] & " and " & [Enter To Date]
End Sub
and even ....
Private Sub PageHeader_Print(Cancel As Integer, PrintCount As Integer)
Let Report_AllocatedCosts.DateRange = "From " & Cstr([Enter Start Date]) & " and " & CStr([Enter To Date])
End Sub
But am having absolutely no luck.
Any suggestions would be appreciated.
Thanks
Rowena