Best practice for handling report print and close

X

XP

I have a button on a form which, when clicked, displays a report. No big deal.

However, I am relatively new to working with reports and I need some
guidance. When the report is displayed, I have the toolbars turned off, but
the main menubar is still displayed. If you close the report it collapses to
Design View, not good.

I would like for the user to only see two options when the report is
displayed: 1) Print; or 2) Close. The Print command should simply send a copy
to the default printer; and the Close command should simply close the report
without any further options or warnings. The user will never need more than
one copy of the report.

I prefer a VBA solution, but the main thing is to get this done. Does anyone
have any suggestions on how to best accomplish this? Best practices, etc.?

All suggestions welcomed. Thanks.
 
F

fredg

I have a button on a form which, when clicked, displays a report. No big deal.

However, I am relatively new to working with reports and I need some
guidance. When the report is displayed, I have the toolbars turned off, but
the main menubar is still displayed. If you close the report it collapses to
Design View, not good.

I would like for the user to only see two options when the report is
displayed: 1) Print; or 2) Close. The Print command should simply send a copy
to the default printer; and the Close command should simply close the report
without any further options or warnings. The user will never need more than
one copy of the report.

I prefer a VBA solution, but the main thing is to get this done. Does anyone
have any suggestions on how to best accomplish this? Best practices, etc.?

All suggestions welcomed. Thanks.

You say the main menu is still displayed.
Use the File + Close to close the report, or the File + Print to
print it.
or...
Create a new custom toolbar with just the print and close buttons.
or..
Press P when the report is open to print it, or C to close it.
 
P

paddyIE

XP,

You can hide the main menu using the following:

Private Sub Form_Load()
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
End Sub

in the first form you use. Be aware that if you do this, you will need to
remember that you have used the code and don't open the form with the code.
Or, you will need to use the "bypass" ( [Shift] ) switch every time you open
your app during development,

I use it in my "Splash" form which I only include as my startup form when
the app is ready to be released. My "Splash" form calls the switchboard.

Also, if you are developing for "runtime", don't depend on "system"
menus/toolbars. They tend to act funny in "runtime". Get into the habit of
using "custom" menu/toolbars during app use.
 

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