Results 1 to 5 of 5
  1. #1
    Ashe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Location
    Blacksburg VA
    Posts
    65

    Publishing database- Shut down run-time errors

    I'm handing my database off to a client who doesn't want to split it, but also doesn't want to see any potential VBA Run-time errors. I compiled the code and digitally signed the database.

    Is there a way to shut down the VBA run-time errors to a generic "error" message, or no error message at all? We don't want any users to have the option of ever pressing "debug" and getting into the code.

  2. #2
    Ashe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Location
    Blacksburg VA
    Posts
    65
    Could I use a module to set all warnings to off?

  3. #3
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Ashe View Post
    Could I use a module to set all warnings to off?
    The way I go around the error message is to put the followingat the beginning of each set of codes: "On Error Resume Next" or "On Error Goto ExitCode". "ExitCode" is a marker I set in the code right next to Exit Sub. This way, when an error is detected the code simply resumes or goes to the "ExitCode" marker which will end the code without an error message

  4. #4
    Ashe is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Location
    Blacksburg VA
    Posts
    65
    Do you do this for each sub? I have hundreds of sub code sets and probably 50 forms and reports with code behind them. I wonder if there's a way to globally define this...

  5. #5
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Ashe View Post
    Could I use a module to set all warnings to off?
    Quote Originally Posted by Ashe View Post
    Do you do this for each sub? I have hundreds of sub code sets and probably 50 forms and reports with code behind them. I wonder if there's a way to globally define this...
    Yes, you should always create an error trap for each one of your subs. Instead of having the error initiate an exit sub, you can create an error message. On the other hand, if all you want if not allow your users to be able to debug, then you can create a .mde or .accde depending on the version of access you are using and distribute that. In a .mde or .accde, all the user will get is an error message, and the only option is to click ok and the code exits.

    In the years I have worked with access, I have learned to distribute .mde or .accde version of the db and never the .mdb or .accdb. In the .mde or .accde format, all the codes and form designs are locked. Your user cannot get to the design.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Evaluate Database Errors
    By billgyrotech in forum Access
    Replies: 2
    Last Post: 08-09-2011, 01:29 PM
  2. Replies: 10
    Last Post: 07-25-2011, 12:07 PM
  3. Automating Report Publishing
    By drizzo in forum Reports
    Replies: 2
    Last Post: 01-20-2011, 01:42 PM
  4. Publishing Project
    By MAABDOLAT in forum Access
    Replies: 1
    Last Post: 06-11-2010, 07:53 AM
  5. Replies: 11
    Last Post: 03-16-2006, 12:28 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums