hide a form

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.
 
J

Jeff Boyce

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
 
G

Guest

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
 
B

Bill H.

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
 
D

Douglas J. Steele

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.
 
J

jmconnor via AccessMonster.com

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.
 
B

Bill H.

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.
 
B

Bill H.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top