The following code worked fine for 5 years in MS Access 2003. My company converted to MS Office 2010 and the VBA MS Access code is now getting an error
1) Do you have these two lines at the top of every code page?
Code:
Option Compare Database
Option Explicit
2) Does the code compile without errors?
3) You might also check for broken (VBA) references. When you change versions of Access (or Office), the names of some of the dll's change. In A2K3, the reference library for Word is "Microsoft Word 11.0 Object Library"; in A2K10, the reference name might be "Microsoft Word 14.0 Object Library". Most reference names do not get updated when you convert from one version to another, which results in broken references.