My runtime error code doesn't "run" in A2007. The program acts as if there were no OnError goto etc. Here is an example. When I run this, I get the pop up announcing run-time error 2002 . I was told that removing Option Explicit from the declarations section would fix this, but not so. Using W7 on 64 bit computer.
Private Sub import_Click()
On Error GoTo Errx
DoCmd.RunCommand acCmdImport 'In A2007 , will generate err 2002
call GoImport
Exit Sub
Errx:
If err.Number = 2002 Then 'means using Acess 2007, need different command
DoCmd.RunCommand acCmdImportAttachAccess
call GoImport
End If
End Sub