VBA code for form

  • Thread starter Thread starter marc
  • Start date Start date
M

marc

I have the following code right now and to add something
to it:

Private Sub Corrective_Action_AfterUpdate()
Dim varCorrectiveAction As Variant
If (Not IsNull(varCorrectiveAction)) Then
Me.FirstResponseDate = Now()
End If
Me.Refresh
End Sub

I have a check box called "warfighter." When there is a
check in the box I want the above code to work and add the
date automatically to the firstresponsedate. When there
is no check in the box I don't want the code to work and
add the date in the firstresponsedate field.

Can someone please help me
 
Private Sub Corrective_Action_AfterUpdate()
Dim varCorrectiveAction As Variant
If (Not IsNull(varCorrectiveAction)) And Me.WarFighter = True Then
Me.FirstResponseDate = Now()
End If
Me.Refresh
End Sub
 
Thanks for the help
-----Original Message-----
Private Sub Corrective_Action_AfterUpdate()
Dim varCorrectiveAction As Variant
If (Not IsNull(varCorrectiveAction)) And Me.WarFighter = True Then
Me.FirstResponseDate = Now()
End If
Me.Refresh
End Sub

--
Wayne Morgan
Microsoft Access MVP





.
 
Back
Top