In my database I have two fields [TrainingDate] and [Expiration] date. I want the Expiration date to automatically figure "TrainingDate" + 1yr, except if the [ClassName] = "Scaffolding" ( it will add 2 yrs) or "ConfinedSpace" ( add 3 years)
I started with
Private Sub TRAINING_DATE_Enter()
If CLASSNAME = "Scaffold User" Then
DateAdd("y",2,[EXPIRATION])
ElseIf CLASSNAME = "Confined Space" Then
DateAdd("y",3,[EXPIRATION])
Else
DateAdd("y",1,[EXPIRATION])
End If
End Sub
I've put this in the training date events on the on Enter field.
I'm new to this and I'm getting syntax errors. Can someone tell me if I'm heading in the right direction?!?!?!?!