Report already open

  • Thread starter Thread starter gr
  • Start date Start date
G

gr

Hi, if a have a report which record source changes
depending on users choice.
If the report is opened and the user change the critria
and press again the open report button. the report still
is the same (the record source is not changed), so before
in the on click event of the open report button I have
this code


If RptIsLoaded("rptSomething") Then
DoCmd.Close acReport, "rptSomething"
End If
DoCmd.OpenReport stDocName, acViewPreview, strFilter,
strSQL

So, I am closing and then opening again.. is there a more
efficient solution?
 
No. That's the best way.

It is possible to change the Filter of an open report, but this forces it to
reload all its records anyway to gains next to nothing.
 
Back
Top