A
a1_robs via AccessMonster.com
Hi All,
I am trying to create some code to make a message box appear on a form, when
the 'DestroyDate' field value is less than the 'AddDate' field value plus 365
days.
The code I have tried in the Before Update event on the text box is:
Private Sub DestroyDate_BeforeUpdate(Cancel As Integer)
=IIf([DestroyDate] < ([AddDate] + 365),MsgBox("WARNING! Destroy Date is less
than one year!"),0)
End Sub
I get a message saying Compile Error: Syntax Error.
Can anyone spot where I have gone wrong?
Thanks in advance for your help!
I am trying to create some code to make a message box appear on a form, when
the 'DestroyDate' field value is less than the 'AddDate' field value plus 365
days.
The code I have tried in the Before Update event on the text box is:
Private Sub DestroyDate_BeforeUpdate(Cancel As Integer)
=IIf([DestroyDate] < ([AddDate] + 365),MsgBox("WARNING! Destroy Date is less
than one year!"),0)
End Sub
I get a message saying Compile Error: Syntax Error.
Can anyone spot where I have gone wrong?
Thanks in advance for your help!