Results 1 to 4 of 4
  1. #1
    swedni is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Posts
    9

    How to create an Update date

    Have a table with 5 fields in each record.
    Field 5 is a date field (short date).
    My question is whether it is possible to field 5 is updated with the current date if I make a change to any of the fields 1-4?


    This is to get a date on when the record was updated.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    IMHO this kind of validation is best done in a forms BeforeUpdate event.
    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
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    I tend to use the OnDirty event of the form property itself - as it covers all fields; Me.Field5 = Now()

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by NTC View Post
    I tend to use the OnDirty event of the form property itself - as it covers all fields; Me.Field5 = Now()
    Yes, so do I but the OP should be aware that the OnDirty event will fire if a control is edited in any way before trying to save the record, even if a control is over typed with its original value.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Create an update query
    By Bobwords in forum Queries
    Replies: 3
    Last Post: 08-12-2014, 10:32 AM
  2. Replies: 5
    Last Post: 12-12-2013, 12:14 PM
  3. Replies: 3
    Last Post: 03-15-2013, 03:16 AM
  4. query to update a date based on another date
    By tkendell in forum Access
    Replies: 3
    Last Post: 06-29-2011, 09:32 PM
  5. Field allow create but not update
    By techexpressinc in forum Forms
    Replies: 8
    Last Post: 10-14-2010, 07:45 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