By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,963 Members | 1,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,963 IT Pros & Developers. It's quick & easy.

Module breaks with no breakpoint added

P: 5
My issue is this. I have a function that checks to see if a field isNull. If it is it prompts a msgbox and lets the user no to enter a valid number. What happens is the user enters the number and they are directed to this line of code in the VBA Module? I have no breakpoint selected anywhere near this line of code. Actually, no breakpoints exist in this entire application. How or why is this stopping at that point? Has anyone else ran into this?

Thanks,
Feb 6 '08 #1
Share this Question
Share on Google+
7 Replies


Delerna
Expert 100+
P: 1,134
If we are talking about the same thing then yes I have.

Symptom
The code stops at a line as though there was a breakpoint set even though there isn't one. There is no error message so it didn't stop because of an error and if i click the run button to continue, the program continues on and all is well.

Solution
Can't remember the exact process I took but it was something like this

In code mode I actually set the break point at the line it kept stopping at.
Then a ran the program and it stopped at the breakpoint.
Then I clicked the run button to continue.
After the program finished I went back to code mode and turned the brekpoint back off and saved .

After that the program ran without stopping. ????????


I know that at some stage prior to the problem appearing I had been setting and unsetting brekpoints trying to find some bugs in my code. I guess that somewhere along the line I performed a sequence of events that found a bug in vba itself, where vba finds a breakpoint at run time and stops there, but dosn't find the breakpoint at design time and therefore dosn't display it.

Hope this resolves your problem
Feb 6 '08 #2

NeoPa
Expert Mod 15k+
P: 31,709
I've had this too. My solution was similar.
  1. Open spreadsheet and Alt-F11 to VBA window.
  2. Make a simple change (Delete then re-applying a single character will do - but you must move the cursor off the line in-between).
  3. Close all open code windows.
  4. Compile project.
  5. Alt-F11 back to spreadsheet.
  6. Close & save.
Feb 6 '08 #3

P: 1
I have similar problem. My solution is as follows:

1. Comment out the line that causes the stop
2. Run the procedure once with the affending line commented out
3. Exit Access
4. Restart Access
5. Uncomment the affending line.
6. Run it once
7. Recompile by clicking on debug-> compile

It works charmingly.

Best, James
Feb 26 '08 #4

NeoPa
Expert Mod 15k+
P: 31,709
Ah, good for you!
You seem to have come across the famous "perfect code - but Access got its knickers in a twist" bug :D
Often seen in declaration type code (Constants etc).
You've found the solution already it seems. well done.
Feb 27 '08 #5

P: 1
When I observed this, I had just set a few breakpoints and had closed Access. I believe it had crashed on closing.

To fix it, I too commented out the offending line, got off the line, and then went back to it and took the comment mark off.

I then compiled/saved/exited and restarted. Cleared right up.
Nov 26 '10 #6

P: 1
Four years later and it is still a nightmare! And what a waste of time: All morning trying to understand why, but fortunately, the solution is still the same! :)
Thanks for this post!
ps: vba Excel
Aug 18 '14 #7

NeoPa
Expert Mod 15k+
P: 31,709
Just goes to show - old threads ain't dead while they can still help people out there :-)
Aug 18 '14 #8

Post your reply

Sign in to post your reply or Sign up for a free account.