Results 1 to 6 of 6
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    Breakpoints Not Working

    Hi, I am trying to edit another old database. Overall it doesn't look like too difficult a task, one form, one report, two small modules. To understand the code, I'd like to step through the code and validate the logic, get comfortable with it and make the necessary changes, but after placing breakpoints almost everywhere, I've been unable to get the code to stop so I can step through the process. I've validated these are the correct subs by clicking on the "build" button on the form's Event boxes. The only way I can validate the code is running is by inserting a msgbox function which gives me some sort of visual clue.

    Here's a pic of the form load sub.



    Click image for larger version. 

Name:	breakpoint.JPG 
Views:	16 
Size:	33.9 KB 
ID:	23997

    It blows through two breakpoints, displays the msgbox, then disappears even when I respond with a Control + Break. Is there some setting in VBA that overrides this or a security setting I don't know about? Till a few hours ago this was a .mdb Access 2003 file. I just upgraded it to an accdb. I am using Access 2010.

    Signed,
    Dazed and confused.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    I would start by *importing* everything into a fresh new db and see if the problem follows. It only takes a minute.
    http://btabdevelopment.com/how-to-im...-new-mdb-file/

  3. #3
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Lost my post (must've hit F5 again). Suggestion was that the connection between form and code was broken in spite of what the builder suggests. Could also copy code, remove [Event Procedure] from form property sheet, save/close/reopen, recreate [Event Procedure] and paste in code, being careful not to have two sub/end sub lines. BTW, posted code for the form does nothing anyway - it's all commented out.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    " posted code for the form does nothing anyway - it's all commented out."
    Intentionally. I really don't want to run any code until I can walk through it. I put the message box in there (and elsewhere) so I could establish that it was actually executing the code.

    I would start by *importing* everything into a fresh new db
    I'm going to try that and/or see if I can find a different copy of the mdb that works. I'll get back to you.

  5. #5
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    The import to a new db worked. Thanks RG.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    You're very welcome. Any time my database starts acting weird, it is one of the first things I do. It tends to leave any corruption behind. Enjoy your project.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2013 Problem Removing Breakpoints
    By ItsMe in forum Programming
    Replies: 12
    Last Post: 11-02-2015, 05:39 PM
  2. Working query stops working after importing
    By Abacus1234 in forum Import/Export Data
    Replies: 3
    Last Post: 10-25-2015, 09:12 PM
  3. Replies: 6
    Last Post: 11-23-2013, 10:47 PM
  4. Replies: 3
    Last Post: 01-29-2013, 04:34 AM
  5. Replies: 0
    Last Post: 03-28-2011, 04:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums