hide a form

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

Bill H.

I have a form that gathers info to create a report that I display on the
screen (...acPreview).

I'm trying to figure out how to hide the form that calls the report (click
on the report button on the form), and then unhide the form after the report
window is closed.

Thanks.
 
Bill

You say "toe-may-toe", ...

Would it be sufficient to not be able to see the form? If so, you could
Maximize your report when it opens, effectively hiding the form behind it.

Or are you saying that the form has been opened in Dialog mode, forcing it
to stay "on top"?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
In your code:

Hide the form
Open report in Dialog mode
Unhide the form

If you open the report in Dialog mode, code is suspended until you close it.
Actually, if you open the report as a Dialog it should appear on top of your
form anyway...

DoCmd.OpenReport "YourReport", acPreview,,,acDialog

Steve
 
Well, that could work.

How to I tell the report to open full screen?

thx.

Jeff Boyce said:
Bill

You say "toe-may-toe", ...

Would it be sufficient to not be able to see the form? If so, you could
Maximize your report when it opens, effectively hiding the form behind it.

Or are you saying that the form has been opened in Dialog mode, forcing it
to stay "on top"?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
DoCmd.Maximize

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Bill H. said:
Well, that could work.

How to I tell the report to open full screen?

thx.
 
Bill said:
I have a form that gathers info to create a report that I display on the
screen (...acPreview).

I'm trying to figure out how to hide the form that calls the report (click
on the report button on the form), and then unhide the form after the report
window is closed.

Thanks.
Add this code to the "On click" event for the button that calls your report
DoCmd.OpenForm "myform", , , , , acHidden
(You need the commas)

then on the report's "On Close" event add this:
DoCmd.OpenForm "myform", , , , , acWindowNormal
(Again, don't leave out the commas.)

Of course, replace "myform" with the name of your form.
 
I thought about that idea, but in reality I have several forms each of which
opens up the same report (well, there are four different reports, depending
on the values in the form).

So that approach would get complicated, I'm thinking.
 
Ah, well that did make the report full screen, but the command buttons
(min/max) and scroll bars were gone, and all the subsequent forms were also
maximized, so that's not going to work.
 
Back
Top