i have created a public function called validdaterequired does anyone know how i am able to run this function after an update on my form .
below is my function code
Public Function ValidDateRequired(OrderDate As Date, _
RequiredDate As Date) As Boolean
' Default value
ValidDateRequired = False
' Order date must be filled in
If IsNull(textOrderDate) = False Then
' Required date must be filled in
If IsNull(textRequiredDate) = False Then
' If the Required date is later than the Order date,
' it's valid.
If textRequiredDate > textOrderDate Then
ValidDateRequired = True
End If
If textRequiredDate < textOrderDate Then
MsgBox "Wrong"
End If
End If
End Function