IN THE SPOTLIGHT: MDE to MDB Conversion Service
(also supports: ACCDE to ACCDB, ADE to ADP, etc)
IN THE SPOTLIGHT: vbWatchdog
VBA error handling just got easier...
" vbWatchdog is off the chart. It solves a long standing problem of how to consolidate error handling into one global location and avoid repetitious code within applications. "
- Joe Anderson,
Microsoft Access MVP
Meet Shady, the vbWatchdog mascot watching over your VBA code →
(courtesy of Crystal Long, Microsoft Access MVP)
IN THE SPOTLIGHT: vbMAPI
An Outlook / MAPI code library for VBA, .NET and C# projects
Get emails out to your customers reliably, and without hassle, every single time.
Use vbMAPI alongside Microsoft Outlook to add professional emailing capabilities to your projects.
Provided by Allen Browne, December 2006. Updated April 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.
February 2008 Update: 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 Vista. Malware can install itself as in earlier versions of Windows.
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 either 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.
You might choose to stay with Windows XP or earlier versions.
There is no advantage to this workaround. It is no safer than Option 3 above.
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|
This is a cached tutorial, reproduced with permission.
Have your say - comment on this article.
What did you think of 'Errors using multiple versions of Access under Vista/Windows 7'?
No comments yet.
Why not be the first to comment on this article?!
Have your say...