DOB/AGE Error (1 Viewer)

JPR

Registered User.
Local time
Yesterday, 20:21
Joined
Jan 23, 2009
Messages
192
Hello friends,
I have an unbound text box on a form named Age with the following code in the control source box:
=DateDiff("yyyy",[DOB],Date()) & "." & Int(Format(Date(),"mm")-Format([DOB],"mm"))

Unless I type a DOB in the appropriate DOB Text box, the Age text box shows the following error: #Type!
Can this be corrected? Thank you
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 11:21
Joined
May 7, 2009
Messages
19,230
Add Default value to DOB:

Default Value: Date()
 

JPR

Registered User.
Local time
Yesterday, 20:21
Joined
Jan 23, 2009
Messages
192
Thank you. That works fine.
 

Users who are viewing this thread

Top Bottom