Problem hiding the access menu bar

G

Guest

I don't want the standard access menu bar showing when my application is in
production mode. I detect whether I'm in production mode by checking to see
if the Database window is turned on in the startup options. Here's the code I
am using:

If CurrentDb.Properties("StartupShowDBWindow") Then
DoCmd.ShowToolbar "Menu Bar", acToolbarYes
Else
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
End If

This works fine when I am in testing mode - I show the DB window at startup,
and the menu bar is there. When i distribute the appl to customers I change
the startup options so that the DB window is not shown. Then, when I start
the appl in 'production' mode this doesn't work - the menu bar is still
there. But when I start the appl and hold the shift key down to override the
startup options for displaying the DB window so that I can debug, and then
start my splash screen (where the code for startup is) which then shows my
main menu, the menu bar isn't there! Should I be handling this some other
way? I can't figure out why this isn't working in 'production' mode. Any help
is appreciated. Thanks.

Jim B
 
A

Albert D. Kallal

The simple solution is to use no code at all.

You most certainly can, and should hide all of the ms-access interface. The
options to complete hide and keep people out of the ms-access interface can
easily be done using the tools->start-up options. Using those options allows
you to complete hide the ms-access interface (tool bars, database window
etc).

Also, using these options means you do not have to bother setting up
security.

Try downloading and running the 3rd example at my following web site that
shows a hidden ms-access interface, and NO CODE is required to do
this....but just some settings in the start-up.

Check out:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

After you try the application, you can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass. I have a sample mdb file
that will let you "set" the shift key bypass on any application you want.

You can get this at:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you must
shift-by-pass them when you want to work.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute...
 
G

Guest

Maybe I'm missing something but it seems that you aren't just using startup
options - it looks like you also had to create your own menu bar. I don't
want any menu bar. I have a toolbar that I created and use in place of a menu
bar. I already tried using just startup options, but short of creating my own
menu bar it doesn't seems that this works. I tried leaving the startup menu
bar value blank (just goes back to (default)) and I tried (none), which
causes an error. Isn't there a simple way to tell access I don't want a menu
bar? ALso, it seems like the way I am currently trying to do it should work,
but for some reason it doesn't work in 'production' mode, even though I know
I have the startup options set to not show the database window. I don't
understand why my current method isn't working (though it works when I use
Shift!).
 

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