Turn On/Off Code Break Points

TJBernard

Registered User.
Local time
Today, 17:50
Joined
Mar 28, 2002
Messages
176
I cannot figure something out this simple and it is driving me crazy. I set up a code break in my VBA code (F9) and the code does not break any where. I know that some how the code break option has been turned off. I checked under Tools and Options on both the database and the code, and nothing looked incorrect. If anyone has any ideas please let me know.

Thank you for your time.

T.J.
 
Are you sure that the code is even being run? I doubt it. For a quick check, put in

msgbox "Hello"

before the breakpoint. That will tell you if the flow is even getting to the procedure in question.
 
thank you for responding, yes I have tried that as well, none of the code will break at all. I put a message box "hello" on a two different forms on their open, and a few other procedures and it did not break at all.
 
Did you get the Hello message? If not, then the code is not even running. Are these Event Procedures? If so, which ones. The event is probably not being triggered the way you think they should be.
 
Thank you again, yes i did get the "hello" message that I marked as a code break (F9). Nothing will code break. The code is working just fine, just will not break. There has to be an option some where in the database. I have compacted and repaired, and tried after ward, still nothing. But the database works just fine and the code works just fine.
 
Are you doing any error trapping that would cause the line not to be run? Otherwise, I have no idea why you are not able to set breakpoints. What version are you using? Is there a brownish circle in the left margin on the line where you set the breakpoint? Does the line where the breakpoint is set change style?
 
Thank you so much time for your attention to this subject.

All I can say is this is a WEIRD deal. I am an access programmer and I have to break VBA code all the time. I am unaware of anyway to turn off the F9 (break code function) so I am not sure how to turn of off, or even back on, but that is what appears to happen.

The database works just fine, the code works just fine, I just want to break the code to check the value of some variables, and nothing will break. I have command buttons that open up other forms that I set code break on, and once I run the code, it opens the other form just fine with out breaking, I have done this with message boxes, and even on the open event. Nothing will break. I have compacted and repaired and even compiled the code yet nothing changes. I have checked the help files and found nothing, and I have tried the Tools -> Options menu on the VBA code and the MS Access Database side. I have found nothing that can turn this off and on. This is just weird.

Thank you so much for your help, I will keep looking into it, and if I find anything I will let the board know.

Thank you,

T.J.
 
TJBernard,

Did you ever find a reason for this?

I'm experiencing exactly the same.

For example:

I have a function in a Standard Module which calculates some value.

If I call a function from the immediate window, after setting a breakpoint at the variable returning the value, it should break, but it does'nt. I tried the msgbox method also, setting a breakpoin immediate before and after the msgbox command. Yes, the msgbox appears, but no break Has someone found what can cause this, because the debugging process gets so extremely more difficult.

..and I even tried making a syntax error in a statement, but it did not give me any error message for this either.

Regards
Gerhard
 
I never found a reason for this. I continued to work and research the problem and never found a reason that this occured. But I did find a way to fix the problem. I copied every single table, query, form, and module into a new MS Access Database and resaved the database and everything worked just fine afterwards. I was able to break the code and test everything out.

Give this a shot and see if it works.

T.J.
 
Thanks for your reply TJBernard,

This was a wery annoying problem, and did the debugging extremely much harder, so I searched several forums, and found others having the problem without any solution or reason for it.

In UtterAccess forums, LarrySteele, who is a knowledged person in Access, has helped me out several times, had found this MSKB article.

The box was not checked, and after checking it - it worked! What I can't figure out is how the ....it got unchecked, because I know I have'nt done it!

Regards
Gerhard
 
Last edited:
Good work, geralf. I searched MS's site more than once and was not able to find that article. :( Interesting ...
 

Users who are viewing this thread

Back
Top Bottom