Show a Report as modal

  • Thread starter Thread starter TNL
  • Start date Start date
T

TNL

Hi,
I have a modal Form.
From this form I open a report in preview modus.
How can I show this report on top or as modal?
I have tried with API setWindowsPos.
Thanks
 
In Access Xp and above you can set a report to be a modal Window, in earlier
versions this wasn't an option. The way to display the report on top of a
modal form is to breifly hide the form as in:

Docmd.OpenReport "MyReport", acViewPreview
'Hide the form
Me.Visible = False
While sysCmd(acSysCmdGetObjectState, acReport, "MyReport") = acObjStateOpen
'loop while the report is open
DoEvents
Wend
'Re-display the report.
Me.Visible = True

HTH
 
Thanks,
that is a good trick. But during the report is shown, I can't prevent the
users to access another action (menuitem)?
Best regards
 
Back
Top