Solved

Troubleshoot Runtime Error in MS Access

Posted on 2015-02-18
3
545 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 35

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

792 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