Running MS Access 2002 and 2007 side-by-side

Yes, before you say it, I know, “Why are you doing anything with MS Access 2002?”.  Because I am, alright.  This program at work is slated for replacement.  It was written in MS Access 2002 and uses a mini MS Access runtime that is launched via some program called RunAccess.exe

Last week, we were releasing a new version of the program to address several bug fixes.  Most of the machines it went onto were fine.   However, 10% got the following 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.

Of course, I googled it and eventually found this article: http://allenbrowne.com/bug-17.html
It talks about how MS Access 2007 ups the revs on the MS Office core dlls, which seems to interfere with older versions of MS Access. 

The biggest kicker of all has to do with the new “Trustworthy Computing Initiative” stuff in MS Office 2007.  Background: Microsoft gets a lot of heat because some sneaky people have written viruses based on MS Office.  This is possible because VBA, built into all MS Office products and documents, has the “On Load” event, that automatically runs, when your MS Word doc or XLS file (etc) is opened.  So, virus writers construct a virus to seek other MS Office documents and modify them so they have an “On Load” event handler containing the virus, which spreads the virus, etc.  It has proven to be pretty effective, unless you have antivirus software, which can easily detect this kind of crap.

Anyway, part of the Trustworthy Computing Initiative is that, from now on, MS Office products will NOT automatically run anything in any MS Office document, unless that file was created on your computer or you explicitly say “Yes, I trust this document”.  It doesn’t seem too difficult.  To go along with this, MS Office checks your machine for older versions of MS Office and disables the Auto-run feature in them too.  That seems like a smart safety-move.  I can sympathize with them and understand why they did this.

At least MS was nice enough to allow your existing documents to be grand-fathered-in.  So, if you have ever used a specific document (spreadsheet, db, etc) from your machine, then, when you install MS Office 2007, it will remember those files and assume that, since you trusted them in the past, you probably still trust them.  However, after Office 2007 is installed, if that file is ever overwritten/replaced by another file, then all bets are off.  Because the new file might be a virus, posing as your favorite word document or Access database.  (yep, that makes sense).

Now, keep in mind.  Those rules don’t apply for brand-new machines.  Of course, a new machine has never accessed any file, ever.  So all office files (access databases, etc) are automatically deemed suspicious.

Anyway, this made it really difficult to get our old program to run on new machines with MS Office 2007 pre-installed.  Asking people to uninstall Office 2007, just seemed really impractical.  The way we solved it was like this:

1. Have a sys-admin open reg edit and navigate to the HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07} folder.  Then change the permissions to allow machine users “Full Control”.  Mostly, this would allow the users to run a patch (so the IT guys wouldn’t have to log into their workstation over and over again).

2. Have the users run a .reg file containing a patch that looked like this:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}]
[HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}\9.0]
@=”Microsoft Access 10.0 Object Library”
[HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}\9.0]
[HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}\9.0\win32]
@=”C:\\Program Files\\Microsoft Office\\Office10\\MSACC.OLB”
[HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}\9.0\FLAGS]
@=”0″
[HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}\9.0\HELPDIR]
@=”C:\\Program Files\\Microsoft Office\\Office10\\”

That fixed it.

However, if the user ever ran MS Access 2007, it would undo the fix.  So we added that to the knowledge base for the help desk. Now, when users call about “The expression On Open…” then the help desk folks have them run the patch (.reg file) again.

Advertisements

About Tim Golisch

I'm a geek. I do geeky things.
This entry was posted in Computer and Internet, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s