Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access VBA Code Won't Break!! 2

Status
Not open for further replies.

avarga82

Programmer
May 19, 2003
62
US
All of a sudden, the VB Editor in Access will not report any error, or even break on a breakpoint. I did not alter any settings. This is only a per-file basis, as it works fine on any other database. Is there something I'm missing, or did my file go down the crapper?

-AV
 
If it won't break on a break point, that means it's not getting to that line. Put the break point on the very first line of the event handler that starts off the called code. Trace it from there and you'll find out why it's not getting to the point you are putting the break point at.

Jeremy

---
Jeremy Wallace
Up & Running Project Coordinator
Fund for the City of New York
 
I know...and trust me, it's on the first line. When I say it won't break, I really do mean it won't break. AT ALL. It won't even break on an error, even if no error handlers are in place. It's the weirdest thing.
 
If anyone still 'listening'.

What ver of Ms. A?

I.m finding the same on an app in ver 2003 ("XP"). Like unto the above, only occurs in the specific APP, not a generic issue at all. EVER executable line in the procedure has a break point. Module runs, evidenced by a number of debug.print statements, does't break!




MichaelRed


 
Hmm. Do you have the error trapping set to something odd? I can't imagine how any of these would make it not break, but if you go to a code window and hit tools | options and then select the General tab there are a few options for Error Trapping. Mine is set to Break on Unhandled Errors...

Not sure if that will help, though.

---
Jeremy Wallace
METRIX Project Coordinator
Fund for the City of New York
 
Mine is (currently) set to break on ALL errors. Still, executes with active breakpoint ({F9} on every possible line, Declaration, code and end. Procedure executes, as evidenced by immediate window response to code, but it never stops. Have don it with:

Code:
Public Function basHeloWorld()

    Debug.Print "Hello World"

End Function

With three breakpoints. Go Figure. Immediate echos the hello thinggy.

MichaelRed


 
Sorry, I completely forgot I posted this thread. I figured out what was wrong. I started messing around with database properties, and I inadvertently turned off the property to break the code. I wanted to turn off the Access Special Keys, and in doing so, also turned off the ability to break the code. See code below...

Dim dbs As Database
Set dbs = CurrentDb

with dbs
.Properties("AllowSpecialKeys") = False
.Properties("AllowBreakIntoCode") = False
end with

By setting the properties to False, the functionality is gone. Set it to true, and it'll be fine. I think I remember reading somewhere that 'AllowBreakIntoCode' must be used in conjunction with 'AllowSpecialAccessKeys', but I'm not sure...I just know this works.



 
avarga82,

Thanks. Close enough for me. Some fiddling around as it didn't "take" at first. Then, I noticed you were setting the properties FALSE, when changed to TRUE, and several tries later, it seems to be working again.

Help says this can be set in Tools -> Startup, but only the Use Special Keys seems to be displayed. AS old as I am, I'm probably just not focusing very well.

I can not imaging that this is not a common issue w/ Ms. A., as the help DOES mention that the po[roperty must be set when debugging. So WHY is this the first time in < 10 years of using Ms. A. that I've had the problem. Also close to a year w/ Ms. A. ver 2003 (aka "XP")?





MichaelRed


 
Ms. A. ver 2003 (aka "XP")
access XP is access 2002 aka access V10

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top