Hide form

  • Thread starter Thread starter Bill H.
  • Start date Start date
B

Bill H.

I have a form with a command button that runs a report.

I want to hide the form when the report button is clicked (easy) and then
for the form to stay hidden until the report is closed (not as easy).

How can I make that happen?

Thanks.
 
One way I was able to do this was to set the visibility of the form = false.
Here is the code snippet:

Me.Form.Visible = False
DoCmd.OpenReport "MyReport", acViewPreview, , , acDialog
Me.Form.Visible = True

The report form needs to be dialog to pause the code execution until the
report is closed. Otherwise the code to hide the form will immediately
display it again as soon as the report is loaded. Hope that helps and I am
sure there are many other ways to do this.
 
Back
Top