Results 1 to 6 of 6
  1. #1
    jmk909er is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2010
    Location
    San Diego, CA
    Posts
    39

    Track change in a form

    Can anyone tell me how to track when there is a change in a form? I want to have a text box on my form titled "Form changed" and the text box would have date and time. I don't need to track what was changed, just that there was a change. I have already tried "before update" event on the form properties as well as "on data change" using the "Now ()" function.

    The "before update" triggers everytime I go to the form regardless if the data has changed or not and the "on data changed" does not seem to do anything. Any help would be appreciated.

    Thanks, Joe

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    The before and after update events should not trigger unless something is changed (and one of them would be the appropriate place for your code). Are you sure you don't have code that changes something in the data?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jmk909er is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2010
    Location
    San Diego, CA
    Posts
    39
    Thanks Paul, you know you may be correct and you got me thinking. I did have 2 fields that were auto populating with a name and date created but I got them fixed so that it is only triggered once when the form is created. I will try again

    Also what do you think is best to use "before" or "after" update? Everything that I found on the web said to use "Before" but that did not seem right to me???

    Thanks for your quick response. -Joe

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    I typically use the before event for validation, since it can be canceled, the after for anything else. Somewhere in the back of my mind (a very cluttered place) is the feeling that updating a value would fail in the before event anyway.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    jmk909er is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2010
    Location
    San Diego, CA
    Posts
    39
    Thanks Paul, it is working like a champ now!

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Happy to help, and welcome to the site by the way! I'll mark this thread solved since it's working now.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Using function to track change through months
    By Accessuser in forum Programming
    Replies: 8
    Last Post: 09-28-2010, 04:09 PM
  2. Track form and module design changes
    By c_smithwick in forum Modules
    Replies: 0
    Last Post: 05-11-2010, 10:28 AM
  3. linking audio track to database
    By sean in forum Access
    Replies: 5
    Last Post: 09-21-2009, 06:25 PM
  4. passing along #'s to track packages online
    By Coolpapabell in forum Access
    Replies: 0
    Last Post: 09-11-2009, 08:36 AM
  5. Track users use of Access database
    By booyeeka in forum Programming
    Replies: 1
    Last Post: 02-26-2009, 02:35 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