VBA Crashes Access

chuckcoleman

Registered User.
Local time
Today, 12:54
Joined
Aug 20, 2010
Messages
380
Hopefully this will help others. I couldn't figure out why one of my Access 2010 applications crashed whenever you opened a form that had VBA code tied to it or even just opened the Visual Basic Editor. I tried a lot of things and ultimately found out that I had a corrupt icon that was "used" in the File-Options-Current Database-Application Icon. When I removed and/or replaced the icon, VBA didn't crash anymore. It drove me nuts until I found it. Hope this helps others!

Chuck
 
I have this issue too .

When I add VBA code to anything, I can always crash it with
Code:
dim x as
Right when I tap the space-bar after 'as' is when it crashes. It started when I modified a block of code using DLOOKUP. but I have since removed all of the VBA code from that command button. and it still happens.

Error report
Faulting application msaccess.exe
version 12.0.6535.5005
stamp 4bf5c550
faulting module vbe6.dll
version 6.5.10.53
stamp 4a947697
debug? 0
fault address 0x00181ca2.
 
Have you tried decompiling your database? Run Access using the following: c:\\MsAccess.exe /decompile where should be replaced with something like: Access 2010: c:\Program Files\Microsoft Office\Office14 Access 2007 c:\Program Files\Microsoft Office\Office13 Access should start. Open your database from within Access. Do a compact and repair. Then bring up the VBA editor, and choose 'Debug -> Compile ...'. Then close your database. You should hopefully now find that things are fixed. The above removes old versions of your compiled VBA code from the database. I've only just discovered this technique, and it's saved me from a great deal of frustration. NikNakk
 
NikNakk, thank you for the feedback. When I was having this issue I did the /decompile process but it would only solve the problem for a brief period of time. Based on other information, I uninstalled Office 2010 SP1 and that absolutely fixed the problem. VBA doesn't crash anymore and it stays compiled. SP1 was the problem and Microsoft is working on the issue. Thanks again.
 
Have you tried decompiling your database? Run Access using the following: c:\\MsAccess.exe /decompile where should be replaced with something like: Access 2010: c:\Program Files\Microsoft Office\Office14 Access 2007 c:\Program Files\Microsoft Office\Office13 Access should start. Open your database from within Access. Do a compact and repair. Then bring up the VBA editor, and choose 'Debug -> Compile ...'. Then close your database. You should hopefully now find that things are fixed. The above removes old versions of your compiled VBA code from the database. I've only just discovered this technique, and it's saved me from a great deal of frustration. NikNakk

Sorry to bump this, but I think it may help someone in the future. This post fixed my problem!

I've built a nice user interface for navigating my database using forms and VBA code, and for whatever reason, one particular event of many macros/events was causing Access to crash (and only if that event was run before any other event in the database. If run after any other event, it worked fine :confused:).

Anyways, this suggestion fixed it for me. I recommend you try this suggestion first if you are having problems too. Thanks again!
 

Users who are viewing this thread

Back
Top Bottom