Friday, December 10, 2010

When your MS Access application won't run in all PCs

If you are an Access developer in a multi-user environment you know that even after testing and debugging, time and again, something could go wrong. How about one of your client PCs not loading the Main Menu (Switchboard)? This is the situation: you get inside your VBA code (from within the problem machine) to see what's going and then hit "Debug, compile" only to get to this line: Set con = Application.CurrentProject.Connection (which appears twice) and some error message about a "missing DLL". The core of the matter is simply that this is Activex Data Object (ADO) code that the application does not recognize even though is clearly referenced (see screenshot above). The answer to this puzzle which is provided in the Microsoft support knowledge base, solution 2 (kb/262847) consists basically in changing this and other lines to be compatible with Data Access Objects (DAO) also listed in this particular example. Do not be misled by the title of that support article. What went wrong? I was developing and debugging in a machine with Access 2003 SP3 installed and moved to another machine with Access 2003 SP2 and even if I updated to SP3 I kept getting that compilation error. As usual, going to all those forums where some people want to honestly help, but also others just are trying to impress with their "expertise" it is hard to find the right answer. There is a lot of misleading and incomplete information out there.

No comments:

Post a Comment