when a record was last updated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trixxnixon
    New Member
    • Sep 2008
    • 98

    when a record was last updated

    is there a way to tell when a record was last updated?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    There's no native way, in Access. You'll have to create a timestamp on your record.
    1. Creat a field in your underlying table
    2. Define it as a Date/Time Datatype
    3. Place a textbox on your form, using the new field in the underlying table as its Control Source
    4. Name the textbox UpdateTimeStamp.
    Now, in the code behind your form, to record date only, use
    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
      Me.UpdateTimeStamp = Date
    End Sub
    For date and time, use
    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
      Me.UpdateTimeStamp = Now
    End Sub
    If you have other code in the Form_BeforeUpda te event, such as validation code, make the

    Me.UpdateTimeSt amp = Now

    line the last one in the event.

    Linq ;0)>

    Comment

    Working...