VBA code wants to 'break' on first run? (1 Viewer)

David R

I know a few things...
Local time
Today, 10:27
Joined
Oct 23, 2001
Messages
2,633
No idea how to search this one due to the general terms involved.

Lately I've got a couple of code snippets that want to 'stop' running and highlight a line with the yellow arrow. If I hit F5 or F8 and step through it as if I were debugging, it works fine from there on until I close and reopen the database. It only seems to do it on fully automated code - for instance an email that is set up to .Display will run correctly, but one set to .Send will breakpoint.

Any theories? I only have seen this so far on databases where the Navigation Window is still visible (i.e. it's not locked down for production), but I can't release a database into the wild if it's going to freeze, my users will have no idea how to step through code!

:edit: Several days ago I DID set a breakpoint on that line (to keep from sending live emails during testing), and Access somehow had a ghost remembering that... letting it breakpoint once more and then Debug > Clear All breakpoints seems to have solved it.
 

Mihail

Registered User.
Local time
Today, 18:27
Joined
Jan 22, 2011
Messages
2,373
Ufff. How many troubles I have had because this. :banghead:

Each time my last solution was to re-design the form (copy-paste) and, of course, copy-paste the code from the damned form to the new one.

Thank you because you posted what you discovered !
 

Users who are viewing this thread

Top Bottom