Access has encountered a problem and needs to close

James Dudden

Access VBA Developer
Local time
Today, 22:16
Joined
Aug 11, 2008
Messages
369
Hi,

I have started receiving this error when trying to open a certain form in my Access 2003 db:

"Microsoft Office Access has encountered a problem and needs to close..."

Here are a few things to note.

1. This only happens on one form of the db - though it is very large with a few subforms.
2. This doesn't happen on any other machines - so it is not the db
3. This is a new PC
4. This happened to me before to a client when they were running their system (different db but same sized form) over terminal servers. To solve it we installed Access on their local machine and it worked.
5. All the files are on this machine.

I would appreciate any help or advice on this, or if you would like me to post more information just ask.

Regards

James
 
There are two possible steps I would take here.
1) Create a new form. Copy all the controls from the existing offending form onto the new form. Copy all the code from the existing form into the module of the new form. Delete the old form. Rename the new form.
2) Create a new Access file. From that file goto Menu->File->Get External Data->Import... and select your old file. Select everything in all the tabs in the dialog that opens, effectively importing all your objects from the old file into the new file. Set any missing references in the new file. Set any startup options in the new file.
I find it not uncommon that Access objects or files get broken beyond repair and that the symptoms of this are pretty inconsistent. Maybe it's just my version, 2002, but I consider it a cost of doing business with Access that any file going through significant development will need one or other of the above steps on about a bi-weekly basis.
 
I experienced the exact sort of problem just last month. The fix for me was the latest Windows XP Service Pack (I believe it is 3)... our IT dept had not updated any of the machines so I snuck it in out of desperation and installed it on my machine only- the problem has not recurred.
 
<The fix for me was the latest Windows XP Service Pack (I believe it is <3)...

Thank you for the reply Grendell but unfortunatley this didn't work for me - back to the drawing board!
 
I had the same problem on a particular class I was working with. It would actually freeze when I compiled it and come to find out it was a conversion problem. I don't remember what the two variables were, I think one was an object and other a long and because I missed the property on the object setting the long it kept crashing on me.

Also, another thing I noticed is the IDE occasionally will crash. If I'm stepping through code and press the step-into button, it'll occasionally not move forward, but if I press it again it will. Well if it doesn't move forward on the second keypress, the third'll make it crash. To get around it, I was stopping the debugger, saving, compacting and repairing, then closeing and reopining. The next time through, no more problems.
 
I get this error for all my Access 2002 databases. They just cause Access 2003 and 2007 to crash. It seems to be something related to setting the rowsource of a lookup combobox, but I cannot seem to troubleshoot it. These databases run flawlessly in Access 2002, but Microsoft has once again messed up my life with its retrogrades like Vista and newer versions of Office
 
Thanks Sandra.

That definitely fixed my problem.

I've been seeking that solution for a long time.
 
Many many times I have had this problem.

The standard advice is to rebuild the database by creating a new database and importing all the objects. This does sometimes fix it. But sometimes it doesn't - the import chugs along until it gets to the biggest, most complex and important form that would take days and days to recreate, and it won't import it. It looks and behaves like there's a problem in the deep magic of the form's module, but increasingly my experience of fixing it without touching the module (usually because it's not possible to get into the module!) makes me think this is not actually the case. )

It's worth trying the following, which have regularly worked for me.

a) STRANGE BUT TRUE. If it's occurred after a long session editing and updating, it's often fixable simply by opening the database on another computer.(YES. REALLY). It then opens OK, and when one goes back to the first computer it, opens OK again there too. The instant fix occurs even if one is opening the same database file, across a network, but on different computers. And even if the first computer isn't even rebooted. Wierd, but it works about 50% of the time currently.
(Am currently editing several Access 2003 format databases that are also run in Access 2010 - in an organisation using both versions - not sure if this is significant. The wierdest thing of all is that once I get this error, it starts to occur also in previous, differently named, backups of the database that previously worked OK, if opened on the same computer - as if the same error has somehow backwardly infected the old copies. I can't explain it.).

b) TEDIOUS BUT TRUE. If it always happens when a particular form is opened, (or if a particular form also glitches when you try to re-import) try opening the query which underlies that form. If it also happens when you open the query (or if you get some odd message like "unable to link table A and table B", where the tables are perfectly fine and always linked OK before), just delete the query and either rebuild it or import from a previous version. Worth trying this even if the query appears to open OK outside the form.

c) If there are a lot of queries embedded in the form, (eg in dropdown lists) you may need to check all of these for corruption in the same way. This will work best if you ALWAYS save and name the queries, so you can check them / re-import them outside of the form itself. But if you can get into design view in the relevant form (sometimes you can't) you can usually just delete the existing SQL and start again on the dropdown.

d) Re-index the tables. Or just rebuild them using a "make table" query.

STOPPING IT FROM HAPPENING

Obviously - take regular backups. Though as above, I have several times had the weIrd experience of backups of previously working versions being "retrospectively" affected on the same computer when this occurs (usually fixable using (a) above.

With an Access 2003 format database which has EVER been opened and closed again by Access 2007 or Access 2010 (and I mean EVER) don't EVER EVER EVER be tempted to use the right-click "change control type" options (eg text-box to dropdown). In my experience, doing this will corrupt the form fatally about 99% of the time. It may also be true in ordinary 2007 and 2010 databases - I've only noticed it in this situation in office 2003 format databases though, and only if they have been opened (at least once) by the later versions. "Virgin" 2003 databases, being edited in office 2003, don't have this problem. I assume some horrid little corruption is introduced by the later versions, which just sits around in the deep magic until you try to do this type change.

Exactly as above, but it also applies if you copy a field and then rename it. If you must copy a field, it's imperative to close the form immediately, then re-open it, before renaming it. Otherwise death, as above.

I'm still working on all of this - it's happening repeatedly to me at the moment, in an organisation that runs every version of Access from 2003 and forward, so will repost if I find any other helpful moves.
 

Users who are viewing this thread

Back
Top Bottom