Removing the menu toolbar from an MSAccess database

Hi all,


This is perhaps an easy question but one that I am trying to implement.

I have several different databases running with simple password forms at the beginning. These as you can imagine can be bypassed. But I was wondering whether there is a way of removing the Access menu bar which allows the user to unhide the database and therefore get access to the different objects.

I know this is not perhaps the ideal solution for a password protected database but in my case it goes a long way.

Thanks
PipMicAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Dale FyeConnect With a Mentor Commented:
That is why I said to re-enable that commandbar when you close your application.

I hide the Office 2007/2010 ribbon with a similar technique in all my applications.

As long as you have good error handling, and have a way to restore the commandbar, you should not have a problem.

Worst case open the database with the Ctrl-Shift to bypass any startup form or autoexec.  Then hit Ctrl-G to open up the VB Editor and type:

Application.CommandBars("Menu Bar").Enabled = True

In the immediate window.
0
 
Dale FyeCommented:
What version of Access are you using?
0
 
PipMicAuthor Commented:
2003


:)
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Dale FyeCommented:
Sorry,

Don't have a box running 2003 at the moment and cannot remember how to do it.  

But you might try:

Private Sub Form_Open(Cancel As Integer)
    Application.CommandBars("Menu Bar").Enabled = False
End Sub

Don't forget to re-enable that somewhere in your code.
0
 
PipMicAuthor Commented:
hi Dale,

the code works a treat but I've been reading around and some say that that kind of coding should not be used because it locks the entire programme down!!!
0
 
PipMicAuthor Commented:
Thanks..does the trick

Apologies for the delay
0
All Courses

From novice to tech pro — start learning today.