Results 1 to 6 of 6
  1. #1
    tfbalogh is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Southeastern PA
    Posts
    8

    Question Record Update Date field


    How do I add a field to a table that captures the date that a record has been updated?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Add a Date type field to the table. Add a textbox control to the form used to update the table. The new textbox needs to be bound to the new field. In the forms Before Update event:
    Me.NewTextboxName= Now()
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    tfbalogh is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Southeastern PA
    Posts
    8
    So far so good but... I don't understand the "In the forms Before Update event: Me.NewTextboxName= Now()" part. The "Me." has Access looking for a Macro. Do I substitute something for the "Me." or do I need to create a new Macro?

  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,642
    Bob's code goes here:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    tfbalogh is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Southeastern PA
    Posts
    8

    almost there...

    Quote Originally Posted by pbaldy View Post
    I now have the record update date on the form. However, when I close the form Access give me an error pop-up message saying that "You can't save this record at this time." It goes on to state that the database encountered an error trying to save the record. The db asks if I want to close the database object anyway. If I say Yes it blows away the date. If I say No is saves the date in the database. How do I stop this error message pop-up from occurring? Thank you in advance for this help. Tom

  6. #6
    tfbalogh is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Southeastern PA
    Posts
    8

    Never Mind...

    Quote Originally Posted by tfbalogh View Post
    I now have the record update date on the form. However, when I close the form Access give me an error pop-up message saying that "You can't save this record at this time." It goes on to state that the database encountered an error trying to save the record. The db asks if I want to close the database object anyway. If I say Yes it blows away the date. If I say No is saves the date in the database. How do I stop this error message pop-up from occurring? Thank you in advance for this help. Tom
    Dummy me put the Event Procedure in the After Update row instead of the Before Update row in the Form/Event window. It's working now. Thanks again. You can image how long I've been trying to figure this out on my own.

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

Similar Threads

  1. VBA Update Statement to update Date field
    By zephyr223 in forum Programming
    Replies: 6
    Last Post: 10-27-2016, 10:45 AM
  2. Replies: 6
    Last Post: 02-24-2015, 01:19 PM
  3. Replies: 3
    Last Post: 08-18-2013, 01:15 PM
  4. Replies: 6
    Last Post: 12-11-2012, 09:40 PM
  5. Update the Date on a revised Record
    By pas49 in forum Access
    Replies: 0
    Last Post: 03-15-2011, 12:55 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