Help and Support
 

powered byLive Search

Access 2002 quits after you use Access 2000 to recompile code

Article ID:295268
Last Review:November 19, 2004
Revision:3.1
This article was previously published under Q295268
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

If you add code to one of the new events in Access 2002, and you then compile the database in Access 2000, when the code is run in Access 2002, you may receive the following error, and then Microsoft Access quits:
Microsoft Access has encountered a problem and needs to close. We are sorry for the inconvenience.
If you click Repair my open database and restart Microsoft Access, the problem persists.

Back to the top

RESOLUTION

You can add or edit code in Access 2000, but you should not compile the database in Access 2000. Instead, open the database in Access 2002, and then compile it there.

Back to the top

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Back to the top

MORE INFORMATION

Steps to Reproduce the Behavior

1.Open the sample database Northwind.mdb.
2.Create a new form that is based on the Orders table.
3.Add the following code to Undo event of the form:
Private Sub Form_Undo(Cancel As Integer)
   Dim intMsg As Integer
   intMsg = MsgBox("Are you sure you want to undo this record?", vbYesNo)
   Cancel = Not (intMsg = vbYes)
End Sub
					
4.Open the form in Form view.
5.Edit a record, and then undo the changes to the record. Note that you receive the message box for the Undo event. Click Yes.
6.Save the changes to the form, and then close the database.
7.Open the sample database Northwind.mdb in Access 2000.
8.Add following line of code to the Declarations section of the module of the form:
Dim MyVar As String
					
9.On the Debug menu, click Compile <database name>.
10.Save and then close the form.
11.Reopen the database in Access 2002.
12.Open the form, edit a record, and then undo the changes to the record.
Note that you experience the behavior that is described in the "Symptoms" section of this article.

Back to the top


APPLIES TO
Microsoft Access 2002 Standard Edition

Back to the top

Keywords: 
kberrmsg kbbug KB295268

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.