I have the following code:
Private Sub Doc_Purged_By_Exit(Cancel As Integer)
If Doc_Purged_By > "0" And Doc_Purged_Date = "" Then
Me.Doc_Purged_Date = Date
Me.Purge_Time = Time
Refresh
Else
Me.Doc_Purged_Date = ""
Me.Purge_Time = ""
End If
End Sub
What happens is when the "Doc_Purged_By" field is populated on a record in the subform and you exit this field the above code runs, populating a date in the "Doc_Purged_Date" field on the same record. The issue I am having is when I go in to another record on the subform to update it the previous records date is updated to the current date instead of keeping the previous date. I think I need to lock or disable or both the date field after the update. Can you help me accomplish this?
Thanks.