S
SamMexico via AccessMonster.com
Hi all,
I am a relative novice to the ways of Access, I am currently setting up a
database in Access 2003.
I have a form field (DOB) that if the date of birth entered makes the person
between 2 and 16 years old I would like a message box to appear notifying the
user (and be able to turn it off). Similarly if an existing record is opened
and a child has it's second birthday I would also like the message to appear..
.I have posted a similar request and have got thus far:
Private Sub DOB_BeforeUpdate(Cancel As Integer)
If DateAdd("yyyy", 2, [DOB]) > Date Or DateAdd _
("yyyy", 16, [DOB]) < Date Then
MsgBox "Please contact the relevant department"
Cancel = False
End If
End Sub
Any help would be vert much appreciated...
Sam
I am a relative novice to the ways of Access, I am currently setting up a
database in Access 2003.
I have a form field (DOB) that if the date of birth entered makes the person
between 2 and 16 years old I would like a message box to appear notifying the
user (and be able to turn it off). Similarly if an existing record is opened
and a child has it's second birthday I would also like the message to appear..
.I have posted a similar request and have got thus far:
Private Sub DOB_BeforeUpdate(Cancel As Integer)
If DateAdd("yyyy", 2, [DOB]) > Date Or DateAdd _
("yyyy", 16, [DOB]) < Date Then
MsgBox "Please contact the relevant department"
Cancel = False
End If
End Sub
Any help would be vert much appreciated...
Sam