Hi, all. I have a field in a query that calculates a person's age at the time of an incident. Here's the formula I use:
Age: DateDiff("yyyy",[DateofBirth],[Incident Date])-IIf(Format([DateofBirth],"mmdd")>Format([Incident Date],"mmdd"),1,0)
The formula works just fine. But I want to have parameters to set a minimum and maximum age. So, I added the following criteria:
Between [MinAge] And [MaxAge]
But it doesn't really work. There are a total of 32 people in the query without parameters.
With the parameters, when I enter zero as the minimum, and 100 as the maximum, I get no records.
When I enter 200 as the maximum, I get 3 records.
When I enter 1000 as the maximum, I got no records.
And when I enter 999999, I get all 32 records.
WTF.
Haaaalp!
Thank you kindly.
Matt