Access project needs to close error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access Data Project (adp) that is running against an SQL Server
2000 database using the OLEDB provider. I am currently developing it so I
frequently change the code and recompile. After some undetermined amount of
time passes I get the "Access has encountered and error and needs to close"
message when I attempt to open a code module in the VBA editor.

Compact and repair does not resolve the problem. The only fix that has
worked is to open a new project file and import my project's forms, reports
and modules into it from the original.

Has anyone else experienced this?

All help appreciated,
-Kriosa
 
Since WinXP Sp2, this happens frequently with either Access 2000 or 2002.
I've also heard of this with A2003 on Win2003 Server.

Beside the version of Access, another thing to check would be to make sure
to never use the function Me.RecordsetClone and use Me.Recordset.Clone
instead.

Any heavy use of BIT fields in your code?
 
Sylvain,

Thanks for your response. The project is Access 2003. I don't really use
either me.recordsetclone or bits in the db design.

Currently I suspect that it may be corrupting because I tend to edit my code
in debugger break mode. I understand that is a No No. So I'll try and mend
my ways and see if this improve the situation.

-Kathryn
 
Editing in debug mode is a fairly common cause of problems in Access. Try
decompiling your Access project and see if that gets rid of the problem. To
decompile a project, type the following from a command line or from the
Start/Run dialogue (substituting where necessary, of course):

"<full path to msaccess.exe>" /decompile "<full path to ADP file"



Rob
 
Woops...missed the closing angle-bracket/greater-than-sign on that...

"<full path to msaccess.exe>" /decompile "<full path to ADP file>"

Oh, and when you substitute the correct file names into the above, DO type
the quotes, DON'T type the angle-brackets.



Rob
 
I never knew that editing in debug mode caused problems. Hmm, explains a
lot.
Though it is very handy to edit that way.
 
Thanks for the reply. I had already tried the /decompile switch.
Unfortunately that did not solve my inability to get to the code in my
project.

To date the only solution is to import all the objects into a new project
container. This leads me to suspect that it is the project container that is
somehow corrupted.

-Kathryn
 
Yes, I do to. I also decompile on a regular basis to counteract the
problem. You'll occasionally see similar problems in a VB6 project (on
which VBA is based) when running from the IDE and editing at the same time,
though for those, all you have to do is go out of VB6 and back in.



Rob
 
Back
Top