I have created a function to check for three dates passed in Which ever one is not null return that date
I call the function from a form for an unbound field I set the control source of the unbound field to call this function
Anyone of the dates can be null Can't I not pass down a null field?
=returnDate([Date1],[Date2],[Date3])
it gives me an error
Function:
Public Function returnDate(Eff As Date, Pro As Date)
If Not IsNull(Eff) Then
returnDate = Eff
Else
If Not IsNull(Pro) Then
returnDate = Pro
Else
returnDate = #1/1/2999#
End If
End If
End Function
I call the function from a form for an unbound field I set the control source of the unbound field to call this function
Anyone of the dates can be null Can't I not pass down a null field?
=returnDate([Date1],[Date2],[Date3])
it gives me an error
Function:
Public Function returnDate(Eff As Date, Pro As Date)
If Not IsNull(Eff) Then
returnDate = Eff
Else
If Not IsNull(Pro) Then
returnDate = Pro
Else
returnDate = #1/1/2999#
End If
End If
End Function