Solved

Removing the menu toolbar from an MSAccess database

Posted on 2014-03-11
6
339 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS ACCESS VBA FORMATTING 9 62
access vba 5 56
Access Report via Windows Desktop Shortcut 12 42
MS Access Duplicate Data Assistance 9 21
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 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