Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error with Open Event in Access 2003 under Vista

17 views
Skip to first unread message

pan

unread,
Dec 27, 2006, 6:17:01 AM12/27/06
to
With Access 2003, SP2 under Vista Ultimate, the following error occures if a
form is opend that has a On Open event procedure like this:

Private Sub Form_Open(Cancel As Integer)
Beep
End Sub

Error:
The expression On Open you entered as the event property setting produced
the following error: Object or class does not support the set of events.


Are there any patches to solve the problem?

Thanks for help
Peter

Wayne-I-M

unread,
Dec 27, 2006, 6:41:01 AM12/27/06
to
Hi Pan

Private Sub Form_Open(Cancel As Integer)
Beep
End Sub

Works fine on my laptop

You could try a small work-around of placeing the "Beep" just before the
open (only a fraction of a second so no one will notice). Place the "Beep"
on the Open form event rather than the OnOpen

Private Sub SomeButton_Click()
DoCmd.OpenForm "FormName", acNormal, "", "", , acNormal
Beep
End Sub

The "SomeButton_OnClick" if just for example - it could be any event that
you use to open the form.

Give it a try and see if this helps

--
Buon Natale, Happy Chritmas.

Wayne
Manchester, England.
Scusate,ma il mio Inglese fa schiffo :-)
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.

pan

unread,
Dec 27, 2006, 6:56:00 AM12/27/06
to
The BEEP is just as a sample command that usually works. Normally, i use the
Form_Open procedure for several other things in a access application such as
filtering etc. This worked fine since version 2.0.

Probably the problem comes because i installed Access 2007 as well. (one
never knows if one has to support an older version...)

Peter

Allen Browne

unread,
Dec 27, 2006, 8:22:14 AM12/27/06
to
Peter, I can reproduce this problem.
It seems to be an issue with References.

When you open Access, you *should* see it automatically match the correct
version of the Access Library to the version you opened the MDB with. But
under Windows Vista Ultimate, if you installed Access 2007 as well as
previous versions, when you open Access 2003, and choose References on the
Tools menu (from the code window), it incorrectly shows you that it is using
the Access 12 Library in the old version. Naturally enough, that doesn't
work.

I don't have a workaround, but this a very serious problem. In fact, it
probably means I will have to uninstall Vista and go back to Windows XP
before I can do any development in older versions of Access, or release MDEs
or ...

Thank you for posting this Peter. I would not have believed it had I not
seen it with my own eyes.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"pan" <p...@discussions.microsoft.com> wrote in message
news:0C7E69C3-814E-4EE1...@microsoft.com...

Wayne-I-M

unread,
Dec 27, 2006, 7:25:00 AM12/27/06
to
I know what you mean. Many people on this forum will disagree with this but
to date I have never loaded a new microsoft programme until it has been
around for at least a year - that way everyone else can get the "bugs" out
and MS will come up with loads of patches and maby a new copy. I understand
this is sort off relying on everyone else but the databases I look after run
a few companies and I really can't "mess about" with people wages. Sorry I
can't be any help with 2007 - I do have a copy on a laptop but have only
looked it slightly.
It may not be the 2007 that is making the problem though.

Good luck


--
Wayne
Manchester, England.

pan

unread,
Dec 27, 2006, 7:35:01 AM12/27/06
to
Thanks Wayne. Its definitive. With some further tests i can say that Access
2003 and Access 2007 on the same machine is NOT WORKING! Vista is for once
not the culprit. I hope there will be soon some fixes. Such bugs are an
absolute NO-GO for Office 2007.

Allen Browne

unread,
Dec 27, 2006, 8:42:36 AM12/27/06
to
Pan, I have posted a thread to confirm the problem, but the Vista registry
*is* the problem, I believe.

Until yesterday, I had Office 2007 and Office 2003, 2002, 2000, and 97
working together under Windows XP. They do not work together under Vista. In
fact, Access 97 does not work at all with the later versions installed.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"pan" <p...@discussions.microsoft.com> wrote in message

news:A6015A4F-9A1B-4D0E...@microsoft.com...

Wayne-I-M

unread,
Dec 27, 2006, 7:45:00 AM12/27/06
to
Hi Alan

Does this mean that this is a generic problem with access 2007 and 2003 if
loaded on same machines.

--
Wayne
Manchester, England.

Allen Browne

unread,
Dec 27, 2006, 8:56:22 AM12/27/06
to
No, Wayne.

I had Access 2007 and 2003 working together fine under Windows XP until
yesterday.

It appears to be a registry issue under Windows Vista (perhaps Ultimate,
perhaps all Vistas.) The older versions using the wrong reference, making
them unusable.

I am investigating further.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"Wayne-I-M" <Way...@discussions.microsoft.com> wrote in message
news:C7A0E12C-6DA0-454C...@microsoft.com...


>
> Does this mean that this is a generic problem with access 2007 and 2003 if
> loaded on same machines.
>
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "Allen Browne" wrote:
>
>> Peter, I can reproduce this problem.
>> It seems to be an issue with References.
>>
>> When you open Access, you *should* see it automatically match the correct
>> version of the Access Library to the version you opened the MDB with. But
>> under Windows Vista Ultimate, if you installed Access 2007 as well as
>> previous versions, when you open Access 2003, and choose References on
>> the
>> Tools menu (from the code window), it incorrectly shows you that it is
>> using
>> the Access 12 Library in the old version. Naturally enough, that doesn't
>> work.
>>
>> I don't have a workaround, but this a very serious problem. In fact, it
>> probably means I will have to uninstall Vista and go back to Windows XP
>> before I can do any development in older versions of Access, or release
>> MDEs
>> or ...
>>
>> Thank you for posting this Peter. I would not have believed it had I not
>> seen it with my own eyes.
>>

pan

unread,
Dec 27, 2006, 8:00:00 AM12/27/06
to
Thanks Allen. If you use "Detect and Repair" from the Help menu, you can
"fix" the problem as long as you are not using Access 2007 anymore. If you do
that, 2007 "repairs" again and the circus begins again. Good to know that
there are no problems under XP.
So, this is the dead end for Vista as a developper machine. At least for a
while...

Peter

David W. Fenton

unread,
Dec 27, 2006, 7:10:16 PM12/27/06
to
Wayne-I-M <Way...@discussions.microsoft.com> wrote in
news:120982EB-D4A8-4D10...@microsoft.com:

> Private Sub Form_Open(Cancel As Integer)
> Beep
> End Sub
> Works fine on my laptop
>
> You could try a small work-around of placeing the "Beep" just
> before the open (only a fraction of a second so no one will
> notice). Place the "Beep" on the Open form event rather than the
> OnOpen
>
> Private Sub SomeButton_Click()
> DoCmd.OpenForm "FormName", acNormal, "", "", , acNormal
> Beep
> End Sub

That's not even close to being equivalent in terms of timing.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

David W. Fenton

unread,
Dec 27, 2006, 7:11:57 PM12/27/06
to
pan <p...@discussions.microsoft.com> wrote in
news:F26C22F0-86EF-44F3...@microsoft.com:

> The BEEP is just as a sample command that usually works. Normally,
> i use the Form_Open procedure for several other things in a access
> application such as filtering etc. This worked fine since version
> 2.0.
>
> Probably the problem comes because i installed Access 2007 as
> well. (one never knows if one has to support an older version...)

Have you seen Allen Browne's post about A2K7 interaction with other
versions of Access when installed on Vista? Have you looked at your
references? My guess would be that you're experiencing what he
reported, in that the references in old versions of Access get
changed to point to the A2K7 versions of the relevant libraries.
This will, of course, cause those apps to completely break.

Allen Browne

unread,
Dec 27, 2006, 11:37:26 PM12/27/06
to
Peter, there is a workaround for this problem, identified by John Viescas,
Peter Doering, David Fenton, and others.

The issue appears to be that, even if you are logged into Vista as a
computer Administrator, it does not run processes with administrative
priviliges. As a result, the Registry is not updated to handle each version,
so the library references are wrong, so the code is unusable.

The workaround is to run msaccess with administrative priviliges.
These steps will be improved as we go, but here's a starting point:

1. Delete any shortcuts created by the installation of each version.
These shortcuts do not have the "Run As Administrator" option.
Instead, create shortcuts to each msaccess.exe.

2. To run any version, right-click the shortcut and Run As Admin.
Choose Allow in the UAC (User Account Control) dialog.
Wait while that version installs.

3. If you accidentally double-clicked a shortcut so the version started
without admin priviliges, the libraries are wrong. Closing and Running as
Admin is not enough. Since the version was running last, Vista doesn't see
the need to reinstall it. The process is:
a) Close it.
b) Run another version As Admin (so the wrong version installs.)
c) Close it.
d) Run As Admin the version you wanted to run in the first place.

4. With Access 2007, it's not necessary to Run As Admin.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"pan" <p...@discussions.microsoft.com> wrote in message
news:0C7E69C3-814E-4EE1...@microsoft.com...

pan

unread,
Dec 28, 2006, 2:55:01 AM12/28/06
to
Thanks Allen. It works. But unfortunately it's only half of the story. After
you started A2003 as admin everything looks fine. When you close A2003 and
open A2007 or another 2007 Office program, the Vista registry praying minute
of silence begins again to configure Office 2007. It's simple unsustainable...

Peter

Allen Browne

unread,
Dec 28, 2006, 5:02:57 AM12/28/06
to
Yes, the l o o o o n g delay when you start A2007 does happen under
WinXP as well.

My coffee intake must have doubled since I installed A2007 and hand to
handle these long pauses. :-)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"pan" <p...@discussions.microsoft.com> wrote in message

news:B78E7314-9352-4F0A...@microsoft.com...

Allen Browne

unread,
Dec 28, 2006, 7:08:40 AM12/28/06
to
Peter, more info from Peter Doering and the Microsoft Access MVPs from
Germany:

If you are in control of your computer environment, you can:
a) Use an Administrator account.
b) Turn off User Access Control (UAC.) Go to:
Control Panel | User Accounts | Turn User Account Control on or Off.

You still get the long delay when you open Access 2007 after using a
previous version, but it avoids the other issues. In other words, the result
is equivalent to what you get if you run under Win XP.

(Any further info I will post under the thread discussing this issue in
comp.databases.ms-access and microsoft.public.access)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"Allen Browne" <Allen...@SeeSig.Invalid> wrote in message
news:OWZvC8lK...@TK2MSFTNGP04.phx.gbl...


> Yes, the l o o o o n g delay when you start A2007 does happen under
> WinXP as well.
>
> My coffee intake must have doubled since I installed A2007 and hand to
> handle these long pauses. :-)
>

David W. Fenton

unread,
Dec 28, 2006, 8:17:11 PM12/28/06
to
"Allen Browne" <Allen...@SeeSig.Invalid> wrote in
news:eLUIVCnK...@TK2MSFTNGP02.phx.gbl:

> Peter, more info from Peter Doering and the Microsoft Access MVPs
> from Germany:
>
> If you are in control of your computer environment, you can:
> a) Use an Administrator account.
> b) Turn off User Access Control (UAC.) Go to:
> Control Panel | User Accounts | Turn User Account Control on
> or Off.
>
> You still get the long delay when you open Access 2007 after using
> a previous version, but it avoids the other issues. In other
> words, the result is equivalent to what you get if you run under
> Win XP.
>
> (Any further info I will post under the thread discussing this
> issue in comp.databases.ms-access and microsoft.public.access)

I posted a reply to your CDMA post on this subject pointing out that
in my opinion, turning off UAC is cutting off your nose to spite
your face. It's a *good* thing that MS has made it easier to run
needed programs as Admin while running most of them with user-level
privileges. Simply setting the shortcuts to run as admin fixes the
problem so I don't see why anyone would take the Draconian step of
entirely shutting off UAC. That's the kind of "I want
CONVENIENCE!!!!" approach that got us in this mess with viruses and
trojans in the first place.

pan

unread,
Dec 29, 2006, 1:49:00 AM12/29/06
to
Your are absolutely right David! But as UAC is implemented in Vista you have
to switch it off (more or less) ! Otherwise you get crazy using a developer
machine. I already thought to create a program, a big switch to set UAC on
and off. The sidebar would be a good place....

Further, the behavior how office 2007 programs are working together with
previous versions is definitely a crab. It makes the cooperation almost
impossible. It's a NO GO for a productive system. I hope we come soon out of
this "public beta"!

Peter Andres
Andres Informatik

0 new messages