Hi,
I am using VBA for the first time. I am trying to check for expiry date as I move through each of the records. However I am not sure how to go about doing that. I have only put the codes in the Form load event and I can't seems to find any Form change event or record change event. Appreciate any advises.
Private Sub Form_Load()
DoCmd.GoToControl "txtExpiryDate"
If txtExpiryDate.Text < Now() Then
DoCmd.GoToControl "txtTest"
txtTest.Text = "Expired!"
End If
End Sub
I am using VBA for the first time. I am trying to check for expiry date as I move through each of the records. However I am not sure how to go about doing that. I have only put the codes in the Form load event and I can't seems to find any Form change event or record change event. Appreciate any advises.

Private Sub Form_Load()
DoCmd.GoToControl "txtExpiryDate"
If txtExpiryDate.Text < Now() Then
DoCmd.GoToControl "txtTest"
txtTest.Text = "Expired!"
End If
End Sub