Nov 19 2020 06:57 AM
I've been using Access for better than 20 years at this point. Only in the last few versions have I noticed this problem of "Phantom breakpoints." This is where you'll be working on a module, or piece of VBA code behind a button, form, label, or other object, and you click the breakpoint little maroon circle out to the left of your code, and when you run the code it stops at that breakpoint. It works great!
The problem comes however when you try to un-check the maroon breakpoint - either by clicking it and it goes away, or by using the menu option "clear all breakpoints" - and then most of time time breakpoint will cease to stop the flow of the code. Unfortunately it doesn't always go away. Maybe 2 out of 10 times it will not really clear the breakpoint, and typically I don't find out about it until it's been distributed to the clients and I get a call that "Your application has stopped on that stupid yellow code thing again!" If it only happened 1 out of 100 times, that would be something I could live with, but 20% of the time is move than I can bear. Can someone people tell me of a cure for this problem? Is it something Microsoft is aware of?
Microsoft makes changes to the interface that involve the look of buttons, or the alternate row color setting on reports, which are nice I guess - I prefer the plain jane look of forms and reports, however You would think they would fix this bug before devoting time to making more "flash" for the interface.
-Breakpointed in Tampa
Nov 20 2020 04:16 AM - edited Nov 20 2020 04:17 AM
Yes, this is a known issue and had been brought to their attention in the past. There are numerous issues with each newer version of Access, just one more reason to stay with the tried, tested and true older versions!!
Feel free to send Microsoft your comments through the Feedback command in Access and also through access.uservoice.com
Nov 21 2020 01:32 PM
SolutionAlthough 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.
May 10 2021 03:34 PM
May 11 2021 01:26 AM
C&R also clears the issue for me, and you should always run this as one of the last steps before publishing a revision.
If C&R shouldn't work for you, a decompile will. Make a backup and then run:
MSACCESS.EXE yourdb.accdb /decompile
Then call C&R, close Access, relaunch the application, call Compile, and save the modules.
Jul 06 2023 10:22 AM
@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.
Jul 06 2023 10:54 AM - edited Jul 06 2023 10:57 AM
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 bug
@Michael_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
Jul 06 2023 12:06 PM
Jul 06 2023 12:52 PM
Jul 06 2023 01:27 PM
Jul 07 2023 07:37 AM
@MendipDataSystems Phantom Breaks are not the worst I've seen with the newer version of Access. What I cannot stand is when you have a window open with your form on it that you're designing, and you also have a window open with Code on it. If you make a mistake, and float your mouse over the Code window, it instantly selects that underlying window - even if you didn't click in that code window. VERY (*%&@ annoying. I cannot tell how you angry this makes me.
Jul 07 2023 07:43 AM
@BrianDP Yes! That is super annoying but I discovered what causes that and now use it as a "feature". When your pointer passes over the VBA Code window, if your pointer passes over the "General" or "Declarations" drop downs at the top of the window, then the VBA code window is immediately activated. Now that I know that, I avoid doing that, unless I want to switch windows.
Jul 07 2023 07:50 AM
Jul 07 2023 08:10 AM
Jul 07 2023 08:22 AM
Nov 21 2020 01:32 PM
SolutionAlthough 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.