Hi!
I'm somewhat new to Access and have a question about creating a timestamp (three timestamps to be exact) on a form. I need to create a timestamp for when Phase 1 is complete, Phase 2 is complete and then when Phase 3 is complete. This is based off three individual text boxes that are filled from an iff statement (iff certain boxes are filled, one box says Phase 1, etc.). The code i have below works, but if Phase 1 is complete and displays 8-18-08 and then Phase 2 is completed on 8-19-08, both fields are changed to 8-19-08 instead of the Phase 1 field staying at 8-18-08.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.DatePhase1Complete = "Phase 1" Then
Me.DatePhase1Completed = Date
Else: Me.DatePhase1Completed = ""
End If
If Me.DatePhase2Complete = "Phase 2" Then
Me.DatePhase2Completed = Date
Else: Me.DatePhase2Completed = ""
End If
If Me.DatePhase3Complete = "Phase 3" Then
Me.DatePhase3Completed = Date
Else: Me.DatePhase3Completed = ""
End If
End Sub
Any ideas on how I can fix this? Thanks for your help!