Solved

Disable VBA window in Access Database

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

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.

Question has a verified solution.

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

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…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

728 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