Provided by Allen Browne, December 2006. Updated August 2010.
If you install multiple versions of Access under Windows Vista or later, you receive errors when you run any code in Access 2000, 2002 and 2003.
For example, if a form has code in its Current event procedure, it fails to open with this message:
The expression On Current you entered as the event property setting produced the following error:
Object or class does not support the set of events.
Earlier versions do not run at all. If you switch to Access 97, you are told:
Microsoft Access can't be started.
Microsoft Access was unable to initialize the Windows Registry
Rerun Microsoft Access or Microsoft Office Setup to reinstall Microsoft Access.
Switching to the lastest version of Access works (after the pause for reinstallation.)
The Access and Office library references are adapted to the version of Access you open. Under Vista, programs do not have the privilege to alter the registry.
Access therefore runs with the last registered library. The code cannot compile using the library of the wrong version, so no code works.
The screenshot is from Access 2000. It correctly identifies the Office 9.0 library (since no database had been opened using the Office library), but incorrectly attempts to use the Access 12.0 library (since Access 2007 was used previously.)
To read more about what References are and which ones apply to each version of Access, see Solving Problems with Library References.
Here are some alternatives.
This suggestion from Graham Mandeno (Access MVP) modifies the Windows Registry so that Access always runs with full permissions:
Even though the key refers to 9.0, the solution applies to all versions from Access 2000 onwards.
(As always, exercise care when editing the registry.)
Create a shortcut to run each msaccess.exe as an administrator. This allows each version to register itself on start-up.
To set up this workaround:
Each time you start Access, you will need to click the Continue button in the User Account Control warning dialog.
For Access 2007, you can use a normal shortcut, i.e. Run As Administrator is not needed for this version.
Note: after you make this change, you may need to switch to another version and switch back before Access will register the correct library.
The simplest (and least safe) workaround is to disable UAC, and use an administrative account.
Warning: This degrades the security of Windows. Malware can install itself as in Windows XP and earlier.
Assuming you are logged in as a computer administrator, the steps are:
You can now switch Access versions as you could under previous versions of Windows. (This does not avoid the reinstallation delay.)
In a corporate environment, you may not be permitted to use any of the options above, so you will need a separate machine for each version of Access. These "machines" may be virtual PCs, a computer that multi-boots, or physical computers.
The Virtual PC might be the quickest way to constantly swap between versions - once you get it started. Disadvantages:
You could run setup.exe from each version of Office every time you wanted to switch versions, but this is no solution. It would require administrative control, be an exercise in frustration with the UAC dialogs, and consume more time than it was worth.
If you are asking this question, the entire problem does not apply to you. Chances are, no one else uses the databases you create.
If you develop databases or support clients who use different versions of Access, you must be able to run multiple versions to:
|Home||Index of tips||Top|