Hide close X in top corner

  • Thread starter Thread starter google3luo359
  • Start date Start date
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
 
You can put a Close button on a custom toolbar that you assign to your
reports.

Rob
 
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
 
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
 
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
 
Back
Top