Object or class not supported

  • Thread starter mbr96 via AccessMonster.com
  • Start date
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
 
M

mbr96 via AccessMonster.com

My apologies, I should have looked first before posting. I did find some
commentary and workaround solutions for this issue on this site and I'll work
with it and post the results. The issue seems to involve different VBA
language references for each version and needing to change the registry each
time you run each version. Vista has tighter security which complicates
things.

I'd still appreciate any commentary from those who have tried solutions - the
knowledge of everyone on this site is VERY much appreciated.

MBR
 
M

mbr96 via AccessMonster.com

Of several solutions suggested with credit to Allen Browne and Graham Mandeno,
I modified the registry to allow Vista to change the reference each time I
run Acc03 vs Acc07. This worked, with the only unusual side effect being
that the Windows Installer runs each time, which looks odd to anyone watching.
No big deal and code runs fine when I open the same database in either
version.

Hope this helps anyone with similar needs. This site is a tremendous
assistance!

MBR


My apologies, I should have looked first before posting. I did find some
commentary and workaround solutions for this issue on this site and I'll work
with it and post the results. The issue seems to involve different VBA
language references for each version and needing to change the registry each
time you run each version. Vista has tighter security which complicates
things.

I'd still appreciate any commentary from those who have tried solutions - the
knowledge of everyone on this site is VERY much appreciated.

MBR
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
[quoted text clipped - 23 lines]
Any suggestions?
MBR
 
J

Jack Leach

Are you looking to exit the application? Try

Application.Quit

I've never had that fail... it doesn't even run the remainder of the
procedure. Never used DoCmd.Quit

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top