Preview of a report ends up under a form that is open in dialog mode

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2000 does not have an 'acDialog' option for Docmd.OpenReport

I have a button on form that is open in 'dialog' mode
The button runs the Docmd.OpenReport command with the acPreview option
This does open the report but it is under my form so it is not visible
My form must be open in dialog mode so that a user cannot close out of the application without using a 'Close' button on the form

Is there a way around this

Can a report be emdedded in a form such that I could bring that form up in dialog mode?
 
Access 2000 does not have an 'acDialog' option for Docmd.OpenReport.


I have a button on form that is open in 'dialog' mode. The button
runs the Docmd.OpenReport command with the acPreview option. This
does open the report but it is under my form so it is not visible.
My form must be open in dialog mode so that a user cannot close out
of the application without using a 'Close' button on the form.

Is there a way around this?

Can a report be emdedded in a form such that I could bring that
form up in dialog mode?

Hide the form when it opens the report.
DoCmd.OpenReport "ReportName", acViewPreview
Me.Visible = False

Actually why not open the report first, then open the form in Dialog
from the Report's Open Event.
DoCmd.OpenForm "FormName", , , , , acDialog

Using a Command Button on the Form, code it's click event:
Me.Visible = False

The report will display (or print).
Code the Report's Close event, either:
forms!FormName.Visible = True

Or.. close the Form
DoCmd.Close acForm, FormName

The report open, and opens the form.
After the form data is entered, click it's command button.
The form hides and the report displays.
When the report closes, it either makes the form visible again or
closes it.
 
Back
Top