Phantom break point in VBA module

N

NKTower

Access 2003, stand-alone single-file .MDB (while developing). If I open the
application and select a button on a form that causes some code in a module
to run, the application opens up the VBA window with a line of code
highlighted in yellow as if I had planted a breakpoint. But I didn't. There
is no diagnostic, and there is no red-button breakpoint on the left. If I
press F5 the appliation continues just fine. If I re-execute the thing, it
executes without the halt. If I do a repair/compress it doesn't fix it. If
I manually add a break point on the line, execute up to it, clear the break
point, save, exit to Windows, restart - phantom breakpoint returns.

I get clean compiles.

I finally got rid of it by cutting the subroutine to the clipboard, and then
pasted it back in at the end of the module. Strange, yes?

I have observed this several times over the years.

Anybody have any idea as to the cause?
 
R

Robert Morley

This is quite common in several versions of Access. Normally, setting a breakpoint and removing it again will work, but if not, you
can decompile your project, either using the /decompile switch or by adding a dummy reference and removing it again. (Or, as you
discovered, cutting & pasting the routine.)


Rob
 

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