Breakpoint stuck?

S

Steve Marshall

Hi all,

I have an AutoExec macro in an MDB file, which simply does a RunCode of a
function that checks if linked tables are OK. It works, but no matter what
I do, the debugger always comes up in break mode when it gets to the first
line of the function code. There is definitely no breakpoint there,
although there was for a time when I was testing it. Anybody seen anything
like this? Is there a way to stop it happening? I have repaired/compacted
the database a number of times - no change.

Thanks in advance
 
G

George Nicholson

Sometimes removing a breakpoint isn't enough & you have to repeat yourself:

Debug>Clear all breakpoints (I've never seen a breakpoint survive this)
Compile (it can't hurt)
Save
Try again

HTH,
 
D

Dirk Goldgar

George Nicholson said:
Sometimes removing a breakpoint isn't enough & you have to repeat
yourself:

Debug>Clear all breakpoints (I've never seen a breakpoint survive
this)

I have. It's definitely the first thing to try, but it's a good idea
after doing that to make some small change to the VBA code -- modify
some line in a trivial way, then change it back to the way it was -- and
then Clear All Breakpoints again, then Compile, then Save. In my
experience that usually takes care of the "phantom breakpoint" problem.

If it doesn't, try these instructions, which were posted by "'69
Camaro", aka Gunny, on 13 January 2005:

--------- begin quoted post ---------
To fix it, open the database, then open the form in Form View. Press
<ALT><F11> to open the VB Editor. Click the "Reset" button on the
toolbar
three times. (Answer to question I know you are going to ask: Because
sometimes twice just isn't enough.) Select the Debug menu -> Compile
<DatabaseName>, just in case the code wasn't already compiled.

Press <ALT><Q> to return to Access. Select the Tools menu -> Database
Utilities -> Compact and Repair Database to compact the database. When
finished, close the database. Open the database again and open the form
in
Form View, then enter text into the field that has recently been causing
the
problem. The problem should be gone because you've removed the ghost
breakpoint.
--------- end quoted post ---------
 
S

Steve Marshall

Thanks for the replies. In my case the problem seems to have gone away
after powering the computer down overnight and restarting this morning. But
I will definitely keep the replies for future reference!

Regards
--
Remove numeral in e-mail address to send e-mails.
www.marshallarts.com.au



George Nicholson said:
Sometimes removing a breakpoint isn't enough & you have to repeat
yourself:

Debug>Clear all breakpoints (I've never seen a breakpoint survive this)
Compile (it can't hurt)
Save
Try again

HTH,
 

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