Results 1 to 5 of 5
  1. #1
    ntambomvu is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Johannesburg south africa
    Posts
    91

    line by line debugging

    Hello All - I am trying to learn access. I have experience in programming in dbase 4 ver 2 ( dos based programming)
    Can someone tell me how to debug (or examine) code starting with the first line to be executed and then going on line by line.
    I want to get a feel for the programs progress from line to line.
    So when I start up the code i want to see where the program is and follow its progress through to the end
    It will be as if there is a breakpoint at the first line executed


    Your help is appreciated

    fred

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Set a breakpoint on the first executable line.

    If you want Access to go into debug mode as soon as file opens, perhaps a Stop command is what you want. It would be in code behind form set to open by default and in that form's Current or Load or Open event.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    read the 'debugging vba' link. Good one, but would add that sometimes you can end up with 'ghost' breaks - code that continues to stop at a line you removed a break from. This can happen even after you close and reopen the form (assuming one is involved). If you're like me and compile frequently during code changes, the option to compile isn't usually available if this problem arises. Thus I cannot say that simply compiling will solve the problem, but can say that if you make any small change to the code, save the module, undo the change, save and compile, it will get rid of the ghost break.

    Also, stepping through code that uses any "active" property such as .ActiveScreen will not perform as expected because the expected object isn't active when the code editor is the active window.

    Just my 2 cents.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    ntambomvu is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Location
    Johannesburg south africa
    Posts
    91
    thanks everybody for the tips- I have been offline for a while but will be getting back to programming soon again.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-22-2017, 07:14 PM
  2. Replies: 2
    Last Post: 03-23-2015, 08:32 AM
  3. Replies: 1
    Last Post: 11-11-2014, 03:54 PM
  4. Replies: 10
    Last Post: 06-10-2014, 09:03 AM
  5. Replies: 7
    Last Post: 04-11-2011, 03:58 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