Hide close X in top corner

G

google3luo359

I am using neat code that hides the close 'x' in the top right corner
of the app.
This prevents the user from accidentally exiting the app at the wrong
time.

But maybe I shouldn't?

I just discovered a problem with it.
If you open a report, go into Print Preview mode and then maximize the
page, you have no obvious way of closing the report.
If they don't know about Ctrl-W they have had it!

Any ideas here?

TIA Ric
 
R

Rob Parker

You can put a Close button on a custom toolbar that you assign to your
reports.

Rob
 
G

google3luo359

Rob said:
You can put a Close button on a custom toolbar that you assign to your
reports.

Thanks Rob, that sounds like a great idea.
Would I create the toolbar first and then call it with VB code? Then
maybe disable the toolbar once the report is closed?

Ric
 
R

Rob Parker

You create a new toolbar, and give it a name - let's say "MyReportToolbar".
Customise it to include the buttons you want; in this case include the Close
option (it's in the View category of the Commands tab). [Note: when you
create the toolbar, it will contain no buttons, so it will appear very
small, floating on the screen. You may need to look closely to locate it,
before you can drag/drop commands to it.] Then open your report(s) in
design mode, and select "MyReportToolbar" for its toolbar (it's in the Other
tab of the property sheet). And that's it; when the report opens your
custom toolbar is displayed, when the report is closed, the toolbar
disappears. No need for any VBA code.

It's possible to build and manipulate toolbars with VBA code, but it's not
necessary to do it that way, and it's usually easiest to not use code.

Rob
 
G

google3luo359

Rob said:
You create a new toolbar, and give it a name - let's say "MyReportToolbar".
Customise it to include the buttons you want; in this case include the Close
option (it's in the View category of the Commands tab). [Note: when you
create the toolbar, it will contain no buttons, so it will appear very
small, floating on the screen. You may need to look closely to locate it,
before you can drag/drop commands to it.] Then open your report(s) in


Thanks very much Rob, that worked out perfectly!

Ric
 

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