Avatar of BFanguy
BFanguy
Flag for United States of America asked on

APPCRASH Access 2010 running macros

I have a ~300 line macro in Access 2010 that runs nightly that pulls information from from sqlserver 2008R2 via odbc (32bit)  and emails ~ 100 different reports.

At least once a week it hangs at different points in the macro with the same "Microsoft Access has stopped working" message (see below).  This has been occurring for the past 3 years (since I installed 2010) and have been patching at least once a week (hoping the problem would go away).

Also, I reboot the computer every night before the macro is ran.

Problem Event Name: APPCRASH
Application Name: MSACCESS.EXE
Application Version: 14.0.7104.5000
Application Timestamp: 51ce12f7
Fault Module Name: olmapi32.dll
Fault Module Timestamp: 522a335e
Exception Code: c0000005
Exception Offset: 002989cc
OS Version: 6.1.7601.2.1.256.48
Local ID: 1033
Microsoft Access

Avatar of undefined
Last Comment
BFanguy

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Bill Ross

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
BFanguy

ASKER
converting to vba is not an option, I believe it is the 32bit odbc driver locking up.
Bill Ross

What version of Windows - 32 or 64 bit?

Why not convert to VBA?  Just so I understand.

Regards,

Bill
Scott McDaniel (EE MVE )

I believe it is the 32bit odbc driver locking up.
What leads you to this assumption? The error above indicates "olmapi32.dll", which is associated with email.

What does your macro do?

FWIW, running unattended operations which rely on macros is fraught with issues. As BillDenver suggests, convert this to VBA, which allows you to actually manage errors, and you'll resolve this much more quickly.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
BFanguy

ASKER
Will try converting to vba.
BFanguy

ASKER
Converted to vba.

Still get:

Problem Event Name: APPCRASH
 Application Name: MSACCESS.EXE
 Application Version: 14.0.7104.5000
 Application Timestamp: 51ce12f7
 Fault Module Name: olmapi32.dll
 Fault Module Timestamp: 522a335e
 Exception Code: c0000005
 Exception Offset: 002989cc
 OS Version: 6.1.7601.2.1.256.48
 Local ID: 1033
Scott McDaniel (EE MVE )

Then I'd suggest you have issues with your email system, since the "fault module name" is olmapi32.dll. You might try repairing or reinstalling Outlook.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
BFanguy

ASKER
Thanks Scott.

I failed to mention, I had reinstalled Outlook after changing from a macro to vba.