Solved

Troubleshoot Runtime Error in MS Access

Posted on 2015-02-18
3
625 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
[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
3 Comments
 
LVL 36

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 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