Solved

Disable VBA window in Access Database

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

Expert Comment

by:Rey Obrero (Capricorn1)
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
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…
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…

815 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

12 Experts available now in Live!

Get 1:1 Help Now