By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,969 Members | 2,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,969 IT Pros & Developers. It's quick & easy.

How to shut off ALL Menus ?

P: n/a
Hello

I have just completed the development of a turn-key Access2k
application. I am using MS Access 2000k application, not the RunTime.
I have compiled it, split it (FE & BE), set all the StartUp Options to
Off, and created the FE MDE. My problem is that the MS Access
(File->Edit->Insert->Records->Window->Help) Menu still appears at the
top
of the screen, which allows the user to Exit without using the CLOSE
BUTTON in my application. Is there a way to shut this Menu OFF ???
ThankYou Greg

Jun 29 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Allow me to answer my own question:
Application.CommandBars("Menu Bar").Enabled = False
'Place this in the OnOpen of the form, solves my problem.

BUT

I still get the MS Access bluebar (for lack of better expression) at
the top of
the screen. This has a close button that the user can press to quit
access,
instead of using my CLOSE BUTTON.
How do I get rid of this, or at least shut off that X (access bluebar
close button) ?

Ap******@gmail.com wrote:
Hello

I have just completed the development of a turn-key Access2k
application. I am using MS Access 2000k application, not the RunTime.
I have compiled it, split it (FE & BE), set all the StartUp Options to
Off, and created the FE MDE. My problem is that the MS Access
(File->Edit->Insert->Records->Window->Help) Menu still appears at the
top
of the screen, which allows the user to Exit without using the CLOSE
BUTTON in my application. Is there a way to shut this Menu OFF ???
ThankYou Greg


Jun 29 '06 #2

P: n/a
Ap******@gmail.com wrote:
Allow me to answer my own question:
Application.CommandBars("Menu Bar").Enabled = False
'Place this in the OnOpen of the form, solves my problem.

BUT

I still get the MS Access bluebar (for lack of better expression) at
the top of
the screen. This has a close button that the user can press to quit
access,
instead of using my CLOSE BUTTON.
How do I get rid of this, or at least shut off that X (access bluebar
close button) ?


If you have a form that is opened at start up and stays open the entire time
that your app is running then you can execute whatever code you are running
now in your [Close] button in the Close or Unload event of that form. That
way you don't have to concern yourself with how they close the app.

If you don't have such a form then create one explicitly for that purpose
and open it hidden at startup.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 29 '06 #3

P: n/a
Thankyou for the response.
The suggestion of OnUnload or OnClose of the form does not work
for me, because my VARIABLES LOSE THEIR VALUES in those
states? These two publicly defined Variables get assigned in the
Module1 module and work perfectly throughout the app, but lose
their value without reason, in the unload of the form? This is not an
option. Any other ideas? Can't I shut off the [X] close button of the
MS Access BlueBar?


Rick Brandt wrote:
Ap******@gmail.com wrote:
Allow me to answer my own question:
Application.CommandBars("Menu Bar").Enabled = False
'Place this in the OnOpen of the form, solves my problem.

BUT

I still get the MS Access bluebar (for lack of better expression) at
the top of
the screen. This has a close button that the user can press to quit
access,
instead of using my CLOSE BUTTON.
How do I get rid of this, or at least shut off that X (access bluebar
close button) ?


If you have a form that is opened at start up and stays open the entire time
that your app is running then you can execute whatever code you are running
now in your [Close] button in the Close or Unload event of that form. That
way you don't have to concern yourself with how they close the app.

If you don't have such a form then create one explicitly for that purpose
and open it hidden at startup.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Jun 30 '06 #4

P: n/a
* Ap******@gmail.com:
Thankyou for the response.
The suggestion of OnUnload or OnClose of the form does not work
for me, because my VARIABLES LOSE THEIR VALUES in those
states? These two publicly defined Variables get assigned in the
Module1 module and work perfectly throughout the app, but lose
their value without reason, in the unload of the form? This is not an
option. Any other ideas? Can't I shut off the [X] close button of the
MS Access BlueBar?


Rick Brandt wrote:
Ap******@gmail.com wrote:
Allow me to answer my own question:
Application.CommandBars("Menu Bar").Enabled = False
'Place this in the OnOpen of the form, solves my problem.

BUT

I still get the MS Access bluebar (for lack of better expression) at
the top of
the screen. This has a close button that the user can press to quit
access,
instead of using my CLOSE BUTTON.
How do I get rid of this, or at least shut off that X (access bluebar
close button) ?

If you have a form that is opened at start up and stays open the entire time
that your app is running then you can execute whatever code you are running
now in your [Close] button in the Close or Unload event of that form. That
way you don't have to concern yourself with how they close the app.

If you don't have such a form then create one explicitly for that purpose
and open it hidden at startup.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


You can drive a nail in with a bowling ball but your time might be
better spent looking for your hammer.

Jun 30 '06 #5

P: n/a

Ap******@gmail.com wrote:
Thankyou for the response.
The suggestion of OnUnload or OnClose of the form does not work
for me, because my VARIABLES LOSE THEIR VALUES in those
states? These two publicly defined Variables get assigned in the
Module1 module and work perfectly throughout the app, but lose
their value without reason, in the unload of the form? This is not an
option. Any other ideas? Can't I shut off the [X] close button of the
MS Access BlueBar?


So leave the form open the whole time the app is running. Just hide
it. Then who cares if the variables go out of scope when the form
closes?

Jun 30 '06 #6

P: n/a
"Ap******@gmail.com" <Ap******@gmail.com> wrote in
news:11**********************@y41g2000cwy.googlegr oups.com:
Thankyou for the response.
The suggestion of OnUnload or OnClose of the form does not
work for me, because my VARIABLES LOSE THEIR VALUES in those
states? These two publicly defined Variables get assigned in
the Module1 module and work perfectly throughout the app, but
lose their value without reason, in the unload of the form?
This is not an option. Any other ideas? Can't I shut off the
[X] close button of the MS Access BlueBar?

No you cannot shut off that X, without some very serious hacking of
the operating system.

You say you lose some publically defined variables. Variables have
to be initialized and set to a value to be any use. You may want to
store those values in a table somewhere, so that they can be
restored when you reopen the database.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 30 '06 #7

P: n/a
Ap******@gmail.com wrote:
Thankyou for the response.
The suggestion of OnUnload or OnClose of the form does not work
for me, because my VARIABLES LOSE THEIR VALUES in those
states? These two publicly defined Variables get assigned in the
Module1 module and work perfectly throughout the app, but lose
their value without reason, in the unload of the form?


There is no specific reason for a public variable to lost its value in these
events. In an MDB though public variables can lose their value when an
unhandled error occurs. Many developers avoid this problem by using hidden
TextBoxes or TextBoxes on hidden forms instead of public variables.

Since you need a hidden form for its Close/Unload event then you have a
perfectly logical container for such TextBoxes.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 30 '06 #8

P: n/a
You're correct Rick.
I discovered that my Variable values were lost because I had left
the "DoCmd.Quit" statement in "MyCloseButton", so when the
Unload of the form took place my Variable values had already been
discarded. I corrected the problem.

Thankyou All for your advice.
Greg
Rick Brandt wrote:
Ap******@gmail.com wrote:
Thankyou for the response.
The suggestion of OnUnload or OnClose of the form does not work
for me, because my VARIABLES LOSE THEIR VALUES in those
states? These two publicly defined Variables get assigned in the
Module1 module and work perfectly throughout the app, but lose
their value without reason, in the unload of the form?


There is no specific reason for a public variable to lost its value in these
events. In an MDB though public variables can lose their value when an
unhandled error occurs. Many developers avoid this problem by using hidden
TextBoxes or TextBoxes on hidden forms instead of public variables.

Since you need a hidden form for its Close/Unload event then you have a
perfectly logical container for such TextBoxes.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Jun 30 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.