Friday, April 18, 2014

Access switchboard stopped working - object or class does not support the set of events

One of our clients is running an old Access 2000 application that just stopped working. The message the user was getting was something like: "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. ". The client also had Microsoft Access 2010 installed on the machine.

Cause:  a windows update changes the reference for the Microsoft Access Object Library to point to the latest version installed so the application is trying to use the wrong object library and therefore it does not work.

Solution: one way to fix this is to follow the following steps:
  1. Make sure Microsoft Access is not running on the machine;
  2. Locate the latest version of MSACC.OLB which should be under C:\Program Files\Microsoft Office\Office\Office12 or C:\Program Files\Microsoft Office\Office\Office14
  3. Rename MSACC.OLB to something like MSACC.OLB.bck
  4. Now start the application that is failing - this will trigger a re-configuration of Microsoft Access 2000 (or Access 2003) since it will not find the object library that is being referenced, and it will reset the reference back to the correct version of the library and the application should work.
  5. Make sure you rename MSACC.OLB.bck back to MSACC.OLB so that your newer version of Microsoft Access works correctly. This renaming does not affect the reference that caused the trouble in the first place.