how to preview report from pop-up form

  • Thread starter Thread starter paul
  • Start date Start date
P

paul

Hi,
In my Access 2000 application, I have a form (pop
up),from this form there is a button to preview
report.with pop up property, the report will hide behind
the form. So how can I view the report? Thanks a lot.
 
Paul:

To preview a report from a pop up form, you have to temporarily hid the pop
up during report display. This is easy to do; your code in the form would
look like this:

Sub cmdPreviewReport_Click()
Me.Visible = False
Docmd.OpenReport "MyReport", acView Preview
While sysCmd(acSysCmdGetObjectState, acReport, "MyReport") =
acObjStateOpen)
DoEvents
Wend
Me.Visible = True
End Sub
 
Back
Top