Solved

Troubleshoot Runtime Error in MS Access

Posted on 2015-02-18
3
349 Views
Last Modified: 2016-02-11
I wrote a small tool in MS Access 2010. Works great and I have not had any problems with it.

Suddenly, the person using it is getting a runtime error. Strange because it was working fine before.

They do NOT have full version of access on their machine - only the runtime version. So, the error does not tell me anything.

Any suggestions for how to trouble shoot this or to somehow trap the error in code so that I can get a better, more informative error message?
0
Comment
Question by:GenesisTech
3 Comments
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
Comment Utility
Do you get the same error when you run their copy on your computer?  If you don't it's some kind of environmental issue such as permissions or a missing library.

Make sure that all your procedures include error trapping.  Include in the error message, the name of the procedure, the error number, and the error description.
Err_Proc:
    Select Case Err.Number
        Case 2501
            Resume Exit_Proc
        Case Else
            MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure cmdSave_Click of VBA Document Form_frmEmployees"
    End Select

Open in new window

0
 

Author Closing Comment

by:GenesisTech
Comment Utility
Thanks Pat,

This helped me get right to the problem.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
Error handling is critical in applications which will be used in a runtime environment because unhandled errors will cause the application to close.

I would go back through the application and add error handling to each form and code module.  Handle all the errors you know about and add an Else to the error handler procedure which writes the form or module name, error number, and description to a table.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

762 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

11 Experts available now in Live!

Get 1:1 Help Now