Dr. Watson error in Access???

Posted on 2001-08-28
Last Modified: 2008-03-10
I am running NT 4.0 and Access 97 on a Gateway machine.  On certain Access queries, I get a Dr. Watson for Windows NT intercept that closes Access.  The Dr. Watson message box reads:

An application error has occurred and an application log is being generated.


Exception: access violation (0xc0000005), Address:0x0401f9f3

If I was lead programmer at Microsoft, this and the information in the log file might tell me something.  But, alas, this is not the case.  Where can I find what this is supposedly telling me?  I am seriously considering disabling Dr. Watson and let Access tell me what is wrong.  
Question by:jstiefel

Expert Comment

ID: 6435019
well let me tell ya. i get these so often my head spins. i think that it's a function of how big you let your db get and what you try to do when it gets "bloated".  i'm sure that you've seen "access bloat" before. a 10 mb .mdb file that compacts to 1 mb is a prime example.  what i do to alleviate these errors is to decompile the database and recompile it. try this by using the /decompile switch from the start->run box or a command prompt...

[drive][path]msaccess.exe [FilePath][FileName] /decompile

c:\progra~1\office\msaccess.exe c:\MyApp\MyApp.mdb /decompile

once decompiled, open any module and choose debug->compile and save ALL modules (a97) or debug->compile db (a2k)

i have a LOT of code in one particular db, and decompiling and recompiling fixes 99.9% of my errors while under development. post development, i've never seen these errors. (plenty of other runtime errors though...)

hope it helps. i'm not sure that it will, but it's a good start.

LVL 14

Accepted Solution

mgrattan earned 100 total points
ID: 6435169
dovholuk's suggestions are very good advice.  I would also check to make sure you have the latest service release for Access 97 (not sure if it's SR-1, SR2, or later) just to make sure all of the supporting DLLs are up to date.  

Also, if you are calling any custom functions from within your queries, you could open the function and put a break point in the code and then step through it as the query is running to see if something in the code is causing the problem.

Furthermore, problems of this nature can sometimes by resolved by creating a new, empty, database and importing all of the objects from the "broken" database into the new one and then recompiling the code from the VBA module design view (select Debug, Compile and Save all Modules).


Author Comment

ID: 6438975
Being the staunch believer in Murphy's law that I am, I fell in the 0.1% that decompiling doesn't help.  I compacted, decompiled, compiled and recompacted.  Dr. Watson still threw me out of Access.

I probably have the latest SRs but I will check.  

As for importing the objects into an empty new database, the database I am in was originally developed for a similar but not as far reaching application.  I am using this as a developmental platform before I plug it into the working application.  Something may have gone haywire in the developemental database.  I'll try that also.  

The query(ies) that crash Access are group-by, aggregrate queries (group-by, avg, max).  They work by themselves but crash when linked to anything else in the final query behind the form.

I was thinking about disabling Dr. Watson.  Before I do this I am going to off load this database and two other linked databases and run them at home on Win 98 but no Dr. Watson and see if Access can tell me more.

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.


Expert Comment

ID: 6440807

how interesting... i just created a query which will fail 100% of the time, causing an error... i've posted the snapshot to

the query i am using contains two separate sub-queries, are you using sub-queries as well???

very odd. i hate it when access can "handle it".

LVL 57
ID: 6440849
Just an FYI: Dr. Watson can actually cause errors.  Try turning him off and you may find you don't have a problem<g>.


Expert Comment

ID: 6460183
Dr. Watson is mostly occuring when you made a complicated or wrong query. If the query is right, open a new database and import the old db. It will be stable for some time, untill your making your next ugly query.

Author Comment

ID: 6462737
The link that you inserted "is not available"
The query that creates the problem is complicated.

I imported the objects into a new database and the problem was still there.

I ran it on my home computer with Win 95 and no Dr. Watson.  I got the following error message:

MSACCESS caused a general protection fault
in module USER.EXE at 0007:000072c6.
EAX=0bff0046 CS=17a7 EIP=000072c6 EFLGS=00000246
EBX=00010000 SS=1bc7 ESP=00008d58 EBP=00628d74
ECX=00020000 DS=16df ESI=000254d8 FS=2c17
EDX=00001fff ES=0aef EDI=00024bcc GS=0000
Bytes at CS:EIP:
17 33 c0 1f 5e 66 5f c9 ca 12 00 90 90 90 c8 16
Stack dump:
00024614 00004bcc 00030000 01000000 f0600af7 01240000 00000af7 24b98266 4e101757 4e100002 000c0002 00000000 0140272f 297d8290 82901757 021426f8
After this error occurs, other Microsoft programs I run develops the same error (Word, IE, WE ).  I even got the Dr. Watson error at work using an FMS program called Total Access Analyzer.  I haven't contacted them yet if they might have an answer.

Expert Comment

ID: 6462768
sorry. i had to clean house on the acct! doh.

anyway, it was the same error type of error you just posted. it happened EVERY time i tried to run the query. 100% confidence.

can you post the query here?

i would suggest you try to create multiple queries. i think that some stack somewhere is being overloaded and causing the gpf (which apparently is not removed from memory on the error).  if you broke the query apart it might actually work????

just throwing out an idea...



Author Comment

ID: 6466039
First, would the SQL for the query be what you need?

Second, instead of trying to come up with one super query, I used subforms linked to the general information on the main form.  This got me around the problem and taught me not to go for one super query behind a form or report.

Expert Comment

ID: 6466075
1) yes the sql query AND as much table structure you can provide would be very beneficial.

2) so have you developed a work-around or are you still looking for ideas?

LVL 54

Expert Comment

ID: 6989672
for jstiefel

It's time to clean up this TA, so I will leave a recommendation in Community Support that this question is:
 - Answered by: dovholuk (200pts) and mgrattan (100pts)
Please leave any comments here within the
next seven days.



Expert Comment

ID: 7003449
Per recommendation, force-accepted by
CS Moderator

dovholuk: points for you at and an old "points for" question for you at

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question