Pasadena
01-27-2001, 01:37 AM
I have a form with DOB and AGE. I have it to where age is automatically calculated by what the DOB is entered; however, the age is not put into the table. It keeps the age on the form but not onto the table. Im using A2K and the following to calculate 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)
I placed the above in the control source for age. DOB and Age are on the same table.
How can I make it show the value on the table?
Thank you for any response!
=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)
I placed the above in the control source for age. DOB and Age are on the same table.
How can I make it show the value on the table?
Thank you for any response!