Pasadena
01-30-2001, 07:59 PM
I have a form with DOB control and AGE control. When the DOB date is filled in, the age is automatically filled with the age; however, the age number is not put into the table. It stays on the form though. Does anyone know what I need to add or change to make sure the age is also shown on the table? Im using A2K and the following code is placed into the control source text box of the age.
=IIf(((DatePart("m",Date())=DatePart("m",[DOB])) And (DatePart("d",Date())=DatePart("d",[DOB]))) Or (DatePart("m",Date())>DatePart("m",[DOB])) Or (DatePart("m",Date())=DatePart("m",[DOB]) And DatePart("d",Date())>DatePart("d",[DOB])),DateDiff("yyyy",[DOB],Date()),DateDiff("yyyy",[DOB],Date())-1)
Thank you for any ideas!
=IIf(((DatePart("m",Date())=DatePart("m",[DOB])) And (DatePart("d",Date())=DatePart("d",[DOB]))) Or (DatePart("m",Date())>DatePart("m",[DOB])) Or (DatePart("m",Date())=DatePart("m",[DOB]) And DatePart("d",Date())>DatePart("d",[DOB])),DateDiff("yyyy",[DOB],Date()),DateDiff("yyyy",[DOB],Date())-1)
Thank you for any ideas!