Solved

Troubleshoot Runtime Error in MS Access

Posted on 2015-02-18
3
417 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
ID: 40616822
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
ID: 40616844
Thanks Pat,

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

Expert Comment

by:Dale Fye (Access MVP)
ID: 40616846
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 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

28 Experts available now in Live!

Get 1:1 Help Now