Feb 1, 2003 #1 lookE IS-IT--Management Sep 28, 2002 23 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.
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.
Feb 1, 2003 #2 EnidtheDog Technical User May 1, 2001 22 GB 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 Upvote 0 Downvote
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