Results 1 to 6 of 6
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Making use of Debug

    I have a bug I'm trying to find where a table field is being erroneously changed. So far, I've not been able to spot the culprit stepping through the code. There are table queries, class modules as well as form modules where the bug might be found. It's not at all clear to me how to make use of "Watch" to find when a field is being changed. I.e., could be in an open recordset, SQL UPDATE SET, etc. I can't seem to get my brain wrapped around what I see on the subject via a Google search. I "think" what I want is for code to break when the value is changed, which would give me the opportunity to inspect the conditions under which the statement is executing.

    A couple of hints here would be most helpful.
    Thanks,
    Bill

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Watch window is used to view changes to variables, not fields in table.

    I have NEVER used it.

    You have searched code for any references to that table/field?

    A third party tool can search macros, queries, properties as well as code. I have used Rick Fisher's Find & Replace for Access. Cost about $50.

    Other possibilities are VTools and MZTools.
    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
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Watch window is used to view changes to variables, not fields in table.
    I was afraid that would be the answer, as that's all I could ferret out of what I found in my Google search.

    I will try to do a better job of isolating the code path to step through its execution.

    Thanks June,
    Bill

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    As well as searching for all VBA references to the field in the VB Editor, you can use Object Dependencies in Database Tools menu to search for all queries which reference the table concerned.
    That still leaves macros for you to search manually

    Otherwise, V-tools is free and works well.
    For info, it seems Rick Fisher no longer updates his Find and Replace utility.
    Not even sure he accepts payment for it either ... though someone may correct me on that.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    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,726

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    I found that "little bugger". The troublesome field was getting erroneously changed in an UPDATE Query........ I had my single record hat on when I coded the UPDATE so the criteria expression was inappropriate.
    Thanks June and Colin for your thoughts,
    Bill

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

Similar Threads

  1. Debug warning
    By Jaap in forum Access
    Replies: 5
    Last Post: 10-13-2017, 01:24 PM
  2. Help Debug code
    By joym in forum Access
    Replies: 6
    Last Post: 05-24-2017, 04:15 PM
  3. Can't debug a Sub
    By wardw in forum Programming
    Replies: 6
    Last Post: 10-18-2013, 10:03 AM
  4. disable debug error
    By alex_raju in forum Access
    Replies: 1
    Last Post: 08-13-2011, 12:19 PM
  5. Debug
    By gio25 in forum Programming
    Replies: 1
    Last Post: 02-08-2011, 08:30 AM

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