Forum Discussion
Phantom Breakpoints in MS Access VBA
- Nov 21, 2020
Although it would be nice if Microsoft found time to correct this, the likelihood of that happening in the context of far more serious, work-stop type bugs, it's not likely to be addressed very soon.
That said, I think you can more or less reliably avoid this problem by making a preventative step one of the things you do just before distributing a new version of an accdb Front End to users.
This "phantom" seems to happen when you've been editing and saving VBA during a session, adding and removing break points. What can happen is that you do end up leaving behind one of those phantoms.
The remedial step I've adopted, based on experience and results shared by others, is that you simply insert and remove one blank line in a module. Then immediately Debug-->Compile your VBA. Then immediately Save it.
Run a Compact & Repair on the accdb. Test in run mode WITHOUT stopping the code anywhere. If the phantom break point does raise its ugly head again, go to the specific procedure and repeat the steps outlined above. At some point, you'll have eliminated them all.
Not as simple, I guess, as being able to count on some automatic process might be, it is effective.
- Michael_BrodskyJul 06, 2023Copper Contributor
this_is_silly Yeah, how annoying. I usually cut the offending sub/function, delete a blank line and paste it back in. Same result. I've only seen this recently in Office 365 apps. Maybe in the next release, they'll introduce some new bugs/features and fix a few of the existing ones.
- isladogsJul 06, 2023MVP
I normally do the same steps & in the same order.
1. Make a small change, delete & save
2. C&R
3. Decompile
I normally step 1 is sufficient.
It appears that this can happen when a breakpoint is put somewhere in the code then the VBE is closed without removing the breakpoint followed by closing Access.
When Access is reopened, there is often a phantom breakpoint where it was left in place previously.
I try to always ensure breakpoints are cleared before closing Access so rarely have the problem myself. However the Access team are aware of & looking into this elusive bugMichael_Brodsky
If you look at the monthly bug fix reports, you'll see that the Access team are working hard to clear the backlog of bugs. They prioritise those having most impact, especially where the bug can be replicated- Tom_van_StiphoutJul 06, 2023Iron ContributorThanks to the tenacity of Geoff Griffith, we now have a reproducible scenario, and MSFT has promised to look at it. Mind you, that is not a promise to fix it.