Reputation: 59
I have the formula:
=DateDiff("yyyy", [DOB], Now())+ Int( Format(now(), "mmdd") < Format( [DOB], "mmdd") )
for calculating age from the [DOB] field in Access
However, when I put this in the Format section on the table in Design view, on enter it changes the text to:
=d"ate"d"iff(yyyy, ["d"OB], "n\ow"())+ I"n"t( For"m"at("n\ow"(), mmdd) < For"m"at( ["d"OB], mmdd) )"
and tells me that it cannot find the field.
Can someone please tell me what is going on?
Upvotes: 0
Views: 78
Reputation: 3898
Sorry to bring you the bad news but this cannot be achieved at least as a table column,
Also consider the following,
Storing calculated fields in table is not recommended
You would want to enter your formula in the Expression field in the Table design mode
Given you are creating a new calculated field
There are restrictions on which formulas can be used as calculated field, from what I have tried date() or now() cannot be used
Upvotes: 1
Reputation: 533
You cannot use that formula in table design. I would suggest using the form that is bound to the table field you wish to have the information.
Upvotes: 1