Time stamp for form or subform fields updated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raziofer
    New Member
    • Nov 2008
    • 1

    #1

    Time stamp for form or subform fields updated

    I have a form where fileds are representing status (Yes/No data type).
    For each field, a time stamp is required when status was changed to Yes.
    These updates are performed in a subform. Can anybody help on this issue?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Use this code behind the form the checkboxes reside on::


    Code:
    Private Sub CheckBoxOne_AfterUpdate()
     If Me.CheckBoxOne = -1 Then
       Me.CheckBoxOneTimeStamp = Now
     Else
       Me.CheckBoxOneTimeStamp = Null
     End If
    End Sub
    
    Private Sub CheckBoxTwo_AfterUpdate()
     If Me.CheckBoxTwo = -1 Then
       Me.CheckBoxTwoTimeStamp = Now
     Else
       Me.CheckBoxTwoTimeStamp = Null
     End If
    End Sub
    Welcome to Bytes!

    Linq ;0)>

    Comment

    Working...