Results 1 to 12 of 12
  1. #1
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Unanswered: VBA Code breakpoints

    Hi All,

    I was debugging some code and had a breakpoint inserted. I fixed the problem and removed the breakpoint but the app continues to 'break' at that point, brings up the VB editor and makes me hit F5! I've removed all of the breakpoints, I've compiled it multiple times and saved the code and I've compacted and repair the db and it still 'breaks'!

    Any ideas?

    Thanx, Stu

    PS: Access 2003 SP3
    --If its free, take it for what its worth!

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    I've encountered this too - I would try and put the bp in again in the same place, remove it then debug / compile / save and try again. Give it a go...?
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I've had this too although the "remove all breakpoints" option has always sorted it (maybe with a compact and repair too). You explicitly selected the "remove all breakpoints" option right?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Yes

    I use the pull down and select 'remove all breakpoints' and I've compacted and repaired. I'm going to try to import into a fresh app and see what happens.
    --If its free, take it for what its worth!

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I think it 99% probable that this is not the case but ya never know - you don't have a STOP command in there do you? Grasping...straws...I know.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Negative

    No stop command. I have had this before and it always cleared itself somehow. I can't remember if I did something I'm forgetting, I think I did. I'll let you know how the import into the new app goes.
    --If its free, take it for what its worth!

  7. #7
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Finally!

    After numerous attempts of getting everything into a new app (way too many forms and queries!) I've finally been able to get it not to 'break'. I did double check all refs and compacted and repaired, so I'm hoping it flushed out whatever it was. Just wish I knew what it was as to avoid it in the future. Thanks for the assists everyone!
    --If its free, take it for what its worth!

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I've encountered this too. I have also always corrected it by setting a breakpoint and then using the Clear All Breakpoints command.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Feb 2012
    Posts
    1

    vba brbreak point always triggered at start of access application

    I set a break point in an access module. It triggered. I cleared it by using "clear all break points". Closed application (Compact and Repair) set on close.
    Re-opened the application and break point triggered.
    I selected the module and selected all the code and set them as comments.
    I then ran the application and of course an error occurred. I stopped the application, saved it, closed it and then opened it again. I then un-commented the module. It ran without triggering the break point.

    Still wondering why the break point triggered even when not sent.

    If anyone knows why or a better way to make this type of error go away, please let me know.

  10. #10
    Join Date
    Jun 2014
    Posts
    1

    Possible solution

    This worked for me when I encountered this problem:
    1. Go to code module and select all code (Ctrl+a)
    2. Cut it out (Ctrl+x)
    3. Open your favourite text editor and paste code in (Ctrl+v)
    4. Go back to code module, close it and close database (forces a database save)
    5. Re open database and code module, copy back in code from your text editor.
    6. Save.
    My guess as to why this works is that the code module contains information other than just the code you can see, such as break points etc. I suspect this can get corrupted and cause problems. When you cut the code out and paste into a text editor, if effectively cleans out the module. So when put just the code back in the module the problem is gone.
    I recall using this strategy succesfully for other problems when the code was not running as it should.
    I am interested in any feedback, pos or neg. ;-)
    Access 2003 SP3 on XP.

  11. #11
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    The safer and more definitive way of solving this problem consists in decompiling the project then recompilign it

    For doing so, ou must start Access with the /Decompile option. Form access 2010, type this from the command line or put in in a .cmd file:
    Code:
    "C:\Program Files\Microsoft Office\OFFICE14\msaccess.exe" "Full path to the datbase file to decompile" /Decompile
    Have a nice day!

  12. #12
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    I've had this happen as well. It seems to be caused by saving while there is a break point. Sinndho's decompiling suggestion has always fixed the issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •