Show a Report as modal

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
 
S

SA

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
 
T

TNL

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top