Really weird - Code acting as though breakpoint set, no breakpoint

  • Thread starter Thread starter BlueWolverine
  • Start date Start date
B

BlueWolverine

Hello,
MS Access 2003 on XP Pro.

I have a form that automatically opens via a macro when you open the file.
(dbl clk on "Inventory.mdb" in Windows)

That form has a function call for an update set to the "On form load" event.

Everything works great, and there are no execution or runtime errors.

But just this morning(3/13/08) When I dbl clk on Inventory.mdb, and the form
opens, the VBA editor opens with the code interrupted at the same spot, an
end if after almost all the code has run. there's a couple docmd.openquery
calls after the end if but most of the code is inside the end if.

There are NO breakpoints set, and I have tried clearing them and saving them
and reopening. It still happens. Also, running the code from an update
button does NOT cause it to get "stuck." It's only (so far) on the form load
when I load the database file.

Let me know, I'm kinda stumped on this one.
 
This is a very common problem in Access which has been there for several
versions now. There are a few ways of dealing with it:

First, but not 100% reliable, is to set a breakpoint on the line where
you're getting the phantom breakpoint and then clear it again.

Second, cut & paste the code, either re-compiling or closing the database
in-between the cut and the paste.

Third, you can set a new Reference in the References menu then clear it.

Fourth, you can force a decompile by running

"<path to MSAccess.exe>" /decompile "<path to your database>"


Rob
 
Not that it makes much difference now, but another method that sometimes
works for me is to select Clear All Breakpoints from the Debug menu.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
THAT did not work at all. That was my very first thought that somehow I left
a breakpoint in and it wasn't showing.

Thanks though.
 
Since it sounds like a known issue with access, does anyone actually know
what's happening to cause this?
 
I'm not sure of the specifics, but I've only ever heard of it happening
somewhere where you had put a breakpoint in previously. It may be something
reproducible, like it occurs when you save the project with the breakpoint
set or something similar; or it may be because it's sunny outside, you're
wearing a red shirt, and you sneezed at the wrong time. ;)



Rob
 
Back
Top