G
Guest
I need to calculate age in a report.
I have one table with the following fields "FirstName", "LastName", "Age"
and "Birthday". The Age column is blank.
I created a report using all the fields in that table.
I have tried to use the expressions that others have written in some of the
previous postings, but I cannot get them to work.
As an example, I tried putting the following as the control source under age:
=DateDiff("yyyy",[DOB],Date())-IIf(Format([DOB],"mmdd")>Format(Date(),
"mmdd"),1,0)
Note: I did change the formula to try to take the information from my table:
=DateDiff("yyyy",[Ages]![Birthday],Date())-IIf(Format([Ages]![Birthday],"mmdd")>Format(Date(),"mmdd"),1,0)
When I view my report, I get a dialog box which states "Enter Parameter
Value" (I don't know what this means exactly).
I tried adding two unbound text boxes as per the suggestion in Microsoft
Office Online and setting the name property for one box to Birthdate and the
other to Age, etc.
I do not know what I am doing wrong.
Any assistance would be greatly appreciated.
I have one table with the following fields "FirstName", "LastName", "Age"
and "Birthday". The Age column is blank.
I created a report using all the fields in that table.
I have tried to use the expressions that others have written in some of the
previous postings, but I cannot get them to work.
As an example, I tried putting the following as the control source under age:
=DateDiff("yyyy",[DOB],Date())-IIf(Format([DOB],"mmdd")>Format(Date(),
"mmdd"),1,0)
Note: I did change the formula to try to take the information from my table:
=DateDiff("yyyy",[Ages]![Birthday],Date())-IIf(Format([Ages]![Birthday],"mmdd")>Format(Date(),"mmdd"),1,0)
When I view my report, I get a dialog box which states "Enter Parameter
Value" (I don't know what this means exactly).
I tried adding two unbound text boxes as per the suggestion in Microsoft
Office Online and setting the name property for one box to Birthdate and the
other to Age, etc.
I do not know what I am doing wrong.
Any assistance would be greatly appreciated.