I am using the code below. I have a form where I have a check box "WasIssueresolved" which if checked or is true should populate today's date in the closedate text box and at same time populate the name of the person signing in. Code works perfect. What I want to do is I want code to work only on the current record. What's happening currently is that when I put "WasIssueresolved" as False then closedate text box becomes hidden but for all records. This is what I don't want. Let me know if I am clearly stating my problem. I am learning how to state it .
I know about the on current event but I already have some code on the current event of the form
Code:
Private Sub WasIssueResolved_Click()
'On Error Resume Next
If WasIssueResolved = True Then
Forms!Ucondition!CloseDate.Visible = True
Forms!UCondition!CloseDate = Date
CloseDate.Locked = True
PersonClosingtheIssue = Me.txtUsername
PersonClosingtheIssue.Locked = True
Else
If WasIssueResolved = False Then
Forms!UCondition!CloseDate.Visible = False
Forms!UCondition!CloseDate = Null
CloseDate.Locked = False
PersonClosingtheIssue = Null
PersonClosingtheIssue.Locked = False
End If
End If
End Sub