Access 2007 VBA - Display conditional values passed into a report on the report
Posted on 2011-02-11
I've got a report that I'm generating dynamically from code like this...
DoCmd.OpenReport "rptExpenditureReport", acViewReport, , "[ProjectID]=" & CStr(lstbxProject.Value) & " AND [Date] BETWEEN #" & CStr(txtStartDate) & "# AND #" & CStr(txtEndDate) & "#"
So I'm passing in a date range to the report. I need to be able to show that date range in the header of the report. I can't use the min and max values of the data items returned because that might not be an accurate representation of the data if no data items fall on the dates used in the date range.
What are my options?