Microsoft Office Access has encountered a problem and needs to close

Asked By 1660 points N/A Posted on -

Hi folks,

While I was encoding some data for our inventory application made from Microsoft Access, I met an error message that said  that the application has encountered an error. It asked me to send the error report or don't send. But there is no notification on why the error occurred. Any suggestion on what to do.

Microsoft Office Access

Microsoft Office Access has encountered a problem and needs to close. We are sorry for inconvenience.

The information you were working on might be lost. Microsoft Office Access can try to compact and repair you open database.

Repair my open database and restart Microsoft Office Access

Please tell Microsoft about this problem.

We have created an error report that you can send to us. We will treat this report as confidential and anonymous.

What data does this error report contain?

Why should I report to Microsoft? 

The application that I am using is closed. After that, I rebooted my computer and ran the application again in hopes of to work ok after a restart. The application starts in a few seconds but the same error appeared again.

I don't have any idea on what to do with this error. Please share some solutions.

Answered By 0 points N/A #122024

Microsoft Office Access has encountered a problem and needs to close


Hi Steve,

As with all development scenarios, proper debugging is necessary to get to the root of the problem. A lot of modern languages (Like those based on .Net) have A Try .. Catch procedure which basically allows the developer to try a piece of potentially buggy code (such as those that execute operations on user input) and have control whenever an exception is thrown so proper issue-resolution steps.

In MS Access though, we are limited to an archaic form of error handling which uses 'go to' statements. So here is how it should generally look like:

Public Sub MySub()
   On Error Goto ErrHandler

   'code goes here

Exit Sub

   'check for expected errors, like possibly a blank name getting entered into a field etc
   If Err.Number = xxx Then
      'fix the problem
      'show the error details
      MsgBox "MySub error: " & Err.Description
   End If
End Sub

Login/Register to Answer

Related Questions