Hi Allen,
I've found that this problem seems to happen if one removes a break point
without forcing a re-compilation of the code (which effectively decompiles
any existing code). If I simply insert a space character or hard return, and
save the project then the ability to do a Debug > Compile ProjectName will be
restored (otherwise, the option remains "greyed out"). Recompiling the code
after removing a break point seems to prevent the ghost breakpoints.
Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
:
Access maintains 2 copies of the code: the text version (what you edit) and
the compiled version (what runs.) There are times when these two get out of
sync., and the symptom you describe is one indicator of this problem.
To solve the problem, decompile the database. This discards the compiled
version. Access recreates it automatically, and the synch problem is gone.
To decompile, make a backup copy of the mdb in case something goes wrong,
and enter something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
Prevention. There are several possible causes, but a common one is editing
the code in break mode (i.e. while the form is open and running, not in
design view.) When you modify a form, Access creates a temp copy so you can
revert to the last saved version. It is now potentially juggling 4 copies of
the code (compiled and text versions of current and original.) It
occasionally seems to confuse these copies if you edit the code without
switching to design view first.
For other suggestions on preventing corruption in general, see:
http://allenbrowne.com/ser-25.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
__________________________________________
X-post on three MSAccess related NG
Follow-up set to it.comp.appl.access
It happens that my code stops without any breakpoint set; well, in the
past I toggled a breakpoint on that instruction but I removed it ages
ago.
See screenshot:
http://www.bb2002.it/temp/breakpoint.gif
Can't understand why...
Any tip or trick?
Thankyou in advance