Batt17 provide this function which I have compiled and tried to use via a text box on a form. I type in = CheckSeason() in control source of the properties box (Ive aslo tried typing in =SeasonPaid() ) and save the form however when I go back to check the cotrol is blank and the properties show it has not been saved. After several attempts to save it in case I had made a mistake I tried using it in a new form I created to see if it would work but again it wont save the function. I saved the function as 'SeasonPaid'.
Option Compare Database
Function CheckSeason(PaymentDate As Date) As Integer
If Format(PaymentDate, "mmdd") > "0831" Then
CheckSeason = Year(PaymentDate) + 1
Else
CheckSeason = Year(PaymentDate)
End If
End Function
Option Compare Database
Function CheckSeason(PaymentDate As Date) As Integer
If Format(PaymentDate, "mmdd") > "0831" Then
CheckSeason = Year(PaymentDate) + 1
Else
CheckSeason = Year(PaymentDate)
End If
End Function
Last edited: