I have a main report with a subreport. How do I requery the query that used for the subreport everytime the main report is opened?
I have something like this, seems like it works, but the subreport picks the result from the last runtime. How do I make the subreport pick the newest result? My subreport name 'rpt_SubReport'. Thanks for help.
Dim qd As QueryDef
Set qd = CurrentDb.QueryDefs("Q_BiweeklySupreport_Cal")
qd.SQL = ("SELECT * FROM CalDetail WHERE ((CalDetail.ReturnDate) BETWEEN #" & dtStartDate & "# AND #" & dtEndDate & "#) ORDER BY [Type], [TagNo]")