Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display opened report instead of the popup form.

Status
Not open for further replies.

lookE

IS-IT--Management
Sep 28, 2002
23
0
0
US
If I have a command button on a popup form that opens a report, how can I make the report display on top of the popup form?

Thank you.

 
Try this:

You will need a module with the following code:

Function IsReportLoaded(strName As String)
IsReportLoaded = (SysCmd(SYSCMD_GETOBJECTSTATE, A_REPORT, strName) > 0)
End Function

Then add this code to your Print Preview button on the popup form:

Forms![frmPopup].Visible = False
DoCmd.OpenReport "rptMyReport", acViewPreview
While IsReportLoaded("rptMyReport")
DoEvents
Wend
Forms![frmPopup].Visible = True

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top