Strange debugging behavior: Access 2003

T

TomT

Here's one I haven't seen before. I set a breakpoint in a module, run the
procedure, and it runs right past the break point without stopping. This
happens in all modules. All references are fine, I decompiled the database
and then compiled it, ran compact and repair, all to no avail.

Other databases behaved normally in this regard. I ended up creating a new
database and imported all objects into to it from the original, and in the
new one, running procedures stop at breakpoints.

Anyone have any idea what might be happening?

Thanks for any asssistance with this,

TomT
 
A

Allen Browne

Hi Tom. Yes, this is a corruption.

The steps you took make perfect sense. A compact/repair followed by a
decompile will often solve the problem. When it does not, creating a new
database and importing everything is the next step. If that also fails, the
next step is the undocumented SaveAsText/LoadFromText.

As far as the cause goes, Access keeps 2 copies of the code: the text
version that you view and edit, and the compiled version that actually runs.
When you modify a form, Access creates a temp copy of the form and its
module, so it is now juggling 3 or 4 copies of the code. Now if you have the
form open and running, it strikes an error, you choose Debug, it shows the
offending line of code. If you then modify the code in break mode, while the
form is open (not design view), it may even have to create the temp copy at
this point. Somewhere in this process is seems to get confused between the
temp copy, the copy being edited, and the compiled code that is running and
paused. The symptom you describe is, I suspect, one of those that follow.

While that's just speculation as to the cause, I have far fewer corruptions
since I stopped editing in break mode and always switched to design view
before making a change.

Other suggestions to prevent corruption:
http://members.iinet.net.au/~allenbrowne/ser-25.html
 
T

TomT

Allen,

Thanks very much for the explanation. I do sometimes edit code in break
mode, and will not do so from now on. It's very nice to know what caused the
problem.

Thanks again,

Tom
 
D

david epsom dot com dot au

procedure, and it runs right past the break point without stopping.

In Access 2000, Tools | Startup | Advanced | Database Special Keys.

An odd name for this feature. Perhaps VBA uses SendKeys to communicate with
Access :~)

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top