P
phleduc
I am opening a report from a form in designview while changing the
recordsource. (see code below)
This works well, the report opens with the appropriate data source
but when I am closing the report wiht the "close" button (print preview
toolbar), it opens in design view.
This does not happen when I close the report with the "close window" x on
the right side of the menu bar?
Anybody an idea how to make it work from the close button as well?
Me.application.Echo False
Dim stDocName As String
stDocName = "Rpt1010_FinancialOverviewByMonth_Graph"
DoCmd.OpenReport stDocName, acViewDesign
Reports!Rpt1010_FinancialOverviewByMonth_Graph!Graph1.RowSource =
"SELECT * from Qry1010_ExpensesGraph WHERE [periodval] >= " &
Me.cboGraphStart & " and [periodval] <= " & Me.cboGraphEnd
DoCmd.Save ( OR I tried DoCmd.Save acReport,
"Rpt1010_FinancialOverviewByMonth_Graph")
DoCmd.OpenReport stDocName, acPreview
Me.application.Echo True
(I also tried to save after going to preview, no difference)
recordsource. (see code below)
This works well, the report opens with the appropriate data source
but when I am closing the report wiht the "close" button (print preview
toolbar), it opens in design view.
This does not happen when I close the report with the "close window" x on
the right side of the menu bar?
Anybody an idea how to make it work from the close button as well?
Me.application.Echo False
Dim stDocName As String
stDocName = "Rpt1010_FinancialOverviewByMonth_Graph"
DoCmd.OpenReport stDocName, acViewDesign
Reports!Rpt1010_FinancialOverviewByMonth_Graph!Graph1.RowSource =
"SELECT * from Qry1010_ExpensesGraph WHERE [periodval] >= " &
Me.cboGraphStart & " and [periodval] <= " & Me.cboGraphEnd
DoCmd.Save ( OR I tried DoCmd.Save acReport,
"Rpt1010_FinancialOverviewByMonth_Graph")
DoCmd.OpenReport stDocName, acPreview
Me.application.Echo True
(I also tried to save after going to preview, no difference)