Solved

Disable VBA window in Access Database

Posted on 2011-03-10
6
190 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

708 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

15 Experts available now in Live!

Get 1:1 Help Now