Solved

Disable VBA window in Access Database

Posted on 2011-03-10
6
199 Views
Last Modified: 2012-05-11
I have an access database being deployed to some users.  They use full run Access, and I have locked down the Current Database settings such as Nav Bar, Developers Toolbar, etc.  I have also added code for the AllowBypasskey Property so they can't use the Shift key.

Everything is perfect.  Except.... There is a TON of code in this database.  If they hit an error that hasn't been trapped, they get the "End" or "Debug" window, and it takes them to the VBA window with the error highlighted. How can I prevent them from ever getting to this window?

Thanks!
0
Comment
Question by:sharpapproach
6 Comments
 
LVL 57
ID: 35096277

  Not sure how this got in "anti-spyware", but the answer is to distribute your DB in the MDE format.

 This strips out all the source code so they won't be able to view anything.

JimD.
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 35096306
one way is to password protect the vba code
tools > dbName properties > protection
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35096906
1. You should have error handling in all of your subs.
This way they never get the "Debug/End" Option.
http://www.cpearson.com/excel/errorhandling.htm

2. Distribute your Database as an MDE/ACCDE file instead of a database file.
http://accessdatabasetutorial.com/2011/02/07/converting-a-microsoft-access-database-file-to-a-mde-file-or-accde-file/
This way there is no code to view...
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 35097969
If you need to add Error handling to your database, you might consider using the free MZ Tools, which can do this for you automatically:

www.mztools.com

This is an addin for the VBA IDE, and is a great product (and it's free).
0
 

Author Closing Comment

by:sharpapproach
ID: 35315579
Cool Utility Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

895 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

14 Experts available now in Live!

Get 1:1 Help Now