Microsoft Access has Stopped Working

R_J_Potter@msn.com

Registered User.
Local time
Today, 12:44
Joined
Nov 4, 2011
Messages
29
Occasionally, when I select a button on a Menu (Form), I receive this message “Microsoft Access has Stopped Working”. Access Shuts Down…
The Button I selected had an 'Event Procedure' behind it. The Button has functioned properly for several years, then suddenly Stops Working.
Event Procedure:

Private Sub Command48_Click()
On Error GoTo Err_Command48_Click

Dim stDocName As String

stDocName = "Auto Service"
DoCmd.OpenReport stDocName, acPreview

Exit_Command48_Click:
Exit Sub

Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click

End Sub

The Only Solution I’ve found is to insert a blank line anywhere in the above code.
For some reason, this fixes the current Issue…

I was hoping this problem would go away when I upgraded from Access 2007 to Access 2010 two months ago, but it returned for the first time in Access 2010 yesterday.
I don’t understand WHY this occurs….
 
Let me know when you find the solution. Sometimes this occurs when I am changing the design of a form. I think it has something to do with the dll files. Just my guess
 
Sometime it might be due to a missing line of code/ accidental deletion of a Dim statement when you have Option Explicit..
* Try compiling the code.. it might show where the error maybe (if there are any)..
* Compact and repair, has always helped..
 

Users who are viewing this thread

Back
Top Bottom