Here’s a common issue, especially with Microsoft Access it would seem (other MVPs have confirmed experiencing this issue in Excel), that I meant to write about many moons ago, but simple never have. Today, in the private MVP group there was a conversation about it, so I thought this was a perfect opportunity to finally do so.
What Are Phantom/Ghost Breakpoints?
When I’ve experienced the issue firsthand, I had placed breakpoints in my code for testing, done some work and then removed the breakpoints, compiled… Yet, when running the code, the program stops execution and breaks into the VBE at the point where the Breakpoint previously was (as if it were still present even though it is no longer there visually in the VBE?!).
So basically, removing the Breakpoint did not work. I’ve even closed the database, reopened it only to have the ghostly Breakpoint remain, as if it were now part of my actual code.
The issue seems to have gotten worse with newer versions of Access as I had never experienced such an issue when I started development back in the days of Access 2000… I’m not sure if I first encountered this bug in Access 2010 or 2013.
How Can We Remove Phantom/Ghost BreakPoints?
There have been a number of workarounds to this problem. Below are the most common workarounds:
- Use the Clear All Breakpoints (under the Debug menu)
- Copy the problematic line, delete it, compile the VBA code, paste the line back and recompile the code again
- Compact and Repair the database (this has not always worked for me as ghost breakpoints have survived compaction 🙂 )
- Decompile the database/VBA, Compact and Repair and then compile the project when you reopen it
- If you have/use Mz-Tools, you can use the Clean command.
I personally, by far, favor approach 4., as other workarounds I have found not to work reliably.
Where’s Microsoft In All Of This?
All I can say is this issue has been mentioned to them in the past.
Sadly, one must simply learn to live with the issue when it occurs and use one of numerous workarounds.
As always, if you are so inclined, feel free to add it to the feedback portal:
A Few Posts On The Subject
If you Google the subject you will find countless post on the subject! But here are a few in no order:


and many, many more…
Effectivement, c’est un problème qui perdure depuis plusieurs versions d’Access, et comme vous j’utilise toujours l’option /decompile pour corriger le problème.
Triste de voir comment Microsoft ne se soucis pas de problème aussi simple que celui-là…
Microsoft ont laissé le VBA/VBE sans aucune amélioration depuis Office 2010 (je crois de mémoire). Je ne crois pas qu’ils veulent investir le moindrement dans ceux-ci. Tous leurs énergies vont dans le web (Flow, PowerApps, DataVerse, …), le reste prend le bord.
Je crois qu’avec le fait qu’ils n’investissent aucument dans le VBA/VBE, n’ont pas amené Access dans les nuages commes ils l’ont fait avec Outlook, Word, Excel et même PowerPoint, qu’il est peut-être le temps de voir le futur d’Access comme limité!
Malheureusement, tu as bien raison, depuis 30 ans Access nous a bien servi, mais Microsoft veut impérativement nous pousser leurs services payants, car ils n’ont aucune rentabilité mensuelle avec Access. Les applications que tu énumères comme PowerApps, j’aime bien, mais comment peut-on espérer développer des applications complètes “Low code” comme nous le faisons avec Access et le VBA…
Tu ne le peux pas.
C’est à cause de ceci, et d’autres facteurs concernant Access, que j’ai migré à faire la majorité (90% maintenant probablement) de mon développement en PHP.
Alors je vais me mettre aussi au PHP ! J’imagine que c’est n’est pas du RAD comme Access …
Merci Daniel!
Non, c’est loin du RAD que Access nous donne, mais en utilisant un Framework, tu peux grandement accélerer le processus de dévelopment. Les résultats peuvent être superbes! Et ça fonctionne sur n’importe quoi que tu veux aussi longtemps que tu as une connexion internet: tablette, cellulaire, Windows, MAC, Linux, …
And here I thought is was something I had done wrong – good to know it isn’t just me! I first encountered it after we upgraded from AC2003 to AC2010. Although it isn’t frequent, it is enough for me to take note of it.
I personally favor the Decompile work-around myself.
Hi,I faced this many times. The easiest way is to add a new empty line before the line where the code breaks. that’s all.