Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / June 2006

Tip: Looking for answers? Try searching our database.

How to shut off ALL Menus ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ApexData@gmail.com - 29 Jun 2006 18:56 GMT
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
ApexData@gmail.com - 29 Jun 2006 19:56 GMT
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) ?

> Hello
>
[quoted text clipped - 8 lines]
>
> ThankYou Greg
Rick Brandt - 29 Jun 2006 22:23 GMT
> Allow me to answer my own question:
> Application.CommandBars("Menu Bar").Enabled = False
[quoted text clipped - 9 lines]
> 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.

Signature

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

ApexData@gmail.com - 30 Jun 2006 01:11 GMT
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?

> > Allow me to answer my own question:
> > Application.CommandBars("Menu Bar").Enabled = False
[quoted text clipped - 22 lines]
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com
Bob Quintal - 30 Jun 2006 01:08 GMT
> Thankyou for the response.
> The suggestion of OnUnload or OnClose of the form does not
[quoted text clipped - 4 lines]
> 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.

Signature

Bob Quintal

PA is y I've altered my email address.

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

Randy Harris - 30 Jun 2006 01:29 GMT
* ApexData@gmail.com:
> Thankyou for the response.
> The suggestion of OnUnload or OnClose of the form does not work
[quoted text clipped - 30 lines]
>> 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.
pietlinden@hotmail.com - 30 Jun 2006 02:01 GMT
> Thankyou for the response.
> The suggestion of OnUnload or OnClose of the form does not work
[quoted text clipped - 4 lines]
> 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?
Rick Brandt - 30 Jun 2006 03:34 GMT
> 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.

Signature

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

ApexData@gmail.com - 30 Jun 2006 04:00 GMT
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

> > Thankyou for the response.
> > The suggestion of OnUnload or OnClose of the form does not work
[quoted text clipped - 15 lines]
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.