We help IT Professionals succeed at work.
Get Started

Access 2010 ACCDE file not running VBA code, ACCDB runs VBA code fine

1,800 Views
Last Modified: 2016-02-10
Hi Experts

Problem statement: Access 2010 ACCDE file not running VBA code, ACCDB runs VBA code fine

Environment

Development
Windows 7 64bit
Access 2010 Pro 32bit

Deployment
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?

Best regards,

Alan
Comment
Watch Question
Owner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE