I have a read only text box named "Age" with the following code.....
form1. # subform [0] . Age :: calculate - (FormCalc, client)
Age = Floor ( Sum ( DOBDays - ArrestDays )/365.25 )
This works fine for what I need but I would like it to work better. I have 2 fields that are date formatted named DOB and Arrest Day. I have 2 other fields named "DOBDays" and "Arrestdays" that do a date2Num function on the 2 date formatted fields.
When a user enters in info on one of the date fields the "Age" field throws in a negative age or a really high age. I realize that it is from the epoch date. I would like to do an IF/then statement that says something like............
if Age > 99 or Age < 1 then Age = "0"
Im a novice with this stuff, so I hope this makes sence. I appreciate any replies in advance.
Thanks!
So the DOBDays field only populates if data has been entered into the DOB field.
And a similar script for the Arrestdays.
George Kaiser