G
geebee
i was able to successfullly specify the recordsource for a report at runtime.
However, when I try to specify the same report's recordsource within a
subreport, I have no luck. Here is my code:
DoCmd.OpenReport "tbl_archive_subreport_daily_with_graph", acViewDesign,
acHidden
Reports!tbl_archive_subreport_daily_with_graph.Report.Filter = strSQL3
Reports!tbl_archive_subreport_daily_with_graph.Report.FilterOn = True
DoCmd.Close acReport, "tbl_archive_subreport_daily_with_graph", acSaveYes
DoCmd.OpenReport "report1_summary2", acViewDesign, acHidden
tbl_masterpop.status, Count(tbl_masterpop.status) AS CountOfstatus FROM
tbl_masterpop WHERE " & strSQL4 & " GROUP BY tbl_masterpop.status ORDER BY
tbl_masterpop.status;"
DoCmd.Close acReport, "report1_summary2", acSaveYes
DoCmd.OpenReport "report1_summary2", acPreview, , strSQL3
Here is tried to specify the recordsource for the subreport
"tbl_archive_subreport_daily_with_graph" by opening it up and specifying the
strSQL3 before i open the main report. But this is not working.
Any suggestions?
Thanks in advance,
geebee
However, when I try to specify the same report's recordsource within a
subreport, I have no luck. Here is my code:
DoCmd.OpenReport "tbl_archive_subreport_daily_with_graph", acViewDesign,
acHidden
Reports!tbl_archive_subreport_daily_with_graph.Report.Filter = strSQL3
Reports!tbl_archive_subreport_daily_with_graph.Report.FilterOn = True
DoCmd.Close acReport, "tbl_archive_subreport_daily_with_graph", acSaveYes
DoCmd.OpenReport "report1_summary2", acViewDesign, acHidden
tbl_masterpop.status, Count(tbl_masterpop.status) AS CountOfstatus FROM
tbl_masterpop WHERE " & strSQL4 & " GROUP BY tbl_masterpop.status ORDER BY
tbl_masterpop.status;"
DoCmd.Close acReport, "report1_summary2", acSaveYes
DoCmd.OpenReport "report1_summary2", acPreview, , strSQL3
Here is tried to specify the recordsource for the subreport
"tbl_archive_subreport_daily_with_graph" by opening it up and specifying the
strSQL3 before i open the main report. But this is not working.
Any suggestions?
Thanks in advance,
geebee