M
mbr96 via AccessMonster.com
I have a simple bit of code that was built by the command button wizard in
Access 2003. It is simply a DoCmd.Quit statement and includes the normal
error-trapping that the wizard builds.
This command button worked fine to close the application as expected. Now
when i click the button I get "Object or class does not support this set of
events." Huh? Here's the code. I tried deleting the button and rebuilding
it with the wizard, same error. I recently installed Access 2007 on this
machine and the code works fine when running it in 2007. Why would this code
fail in 2003?
Private Sub Command18_Click()
On Error GoTo Err_Command18_Click
DoCmd.Quit
Exit_Command18_Click:
Exit Sub
Err_Command18_Click:
MsgBox Err.Description
Resume Exit_Command18_Click
End Sub
Any suggestions?
MBR
Access 2003. It is simply a DoCmd.Quit statement and includes the normal
error-trapping that the wizard builds.
This command button worked fine to close the application as expected. Now
when i click the button I get "Object or class does not support this set of
events." Huh? Here's the code. I tried deleting the button and rebuilding
it with the wizard, same error. I recently installed Access 2007 on this
machine and the code works fine when running it in 2007. Why would this code
fail in 2003?
Private Sub Command18_Click()
On Error GoTo Err_Command18_Click
DoCmd.Quit
Exit_Command18_Click:
Exit Sub
Err_Command18_Click:
MsgBox Err.Description
Resume Exit_Command18_Click
End Sub
Any suggestions?
MBR