Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Disable VBA window in Access Database

Posted on 2011-03-10
6
Medium Priority
?
241 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
[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
6 Comments
 
LVL 58
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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

705 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