Problem statement: Access 2010 ACCDE file not running VBA code, ACCDB runs VBA code fine
Windows 7 64bit
Access 2010 Pro 32bit
Windows 8.1 64bit
Access 2010 runtime 32bit
Original Application/Database history
Access 2003 Front End, MDB for development, MDE in deployment
Access 2003 Back End, MDB in both development and deployment
Converted FE to Access 2010 by Compact and Repair, Compile, Compact and Repair, Save As ACCDB
BE left in Access 2003 MDB
The ACCDB file opens fine (opening screen is login with username and password text boxes and Login command button) The Login command button runs code as expected. FE application picks up data from BE database as expected.
Access 2010 Deployment
To produce ACCDE file suitable for deployment ACCDB file was Compact and Repaired, Save & Publish - Make ACCDE file. Produced ACCDE file with no errors.
On deployment machine application starts ok and displays Login form. However Login Command button does NOT appear to run any code. No error message given just doesn't function.
Back on development machine same thing ACCDE file does not appear to run VBA code, no error message. However by checking VB on development machine I can see only three references whereas in the ACCDB file i have four references. The missing reference is "Microsoft office 14.0 Access database engine Object Library".
If I drop that reference in the ACCDB file then clicking the login button immediately gives an "Compile error: user-defined type not defined" against a "Public dbs As Database" statement.
So my questions are: -
1. Is the missing reference my problem? (I think so).
2. Why would the reference by dropped during the Save As ACCDE function?
3. How can I get Access to keep this reference in rather than dropping it?