Solved

Removing the menu toolbar from an MSAccess database

Posted on 2014-03-11
6
333 Views
Last Modified: 2014-03-25
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
0
Comment
Question by:PipMic
  • 3
  • 3
6 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39921851
What version of Access are you using?
0
 

Author Comment

by:PipMic
ID: 39921877
2003


:)
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39922304
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:PipMic
ID: 39925001
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
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 125 total points
ID: 39925069
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
 

Author Closing Comment

by:PipMic
ID: 39952927
Thanks..does the trick

Apologies for the delay
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now