R
Richardson
I have just about torn my hair out over strange results from a query and I
am looking for any explanation possible.
The query has a field, dateofbirth and a field, age, that calculates from
date of birth. The formula is
datediff("yyyy",[dateofbirth],date())
+Int(format(date(),"mmdd")<format([dateofbirth],"mmdd")).
It calculates the age correctly.
I need to filter by this field for people between certain ages. If I type
the criteria Between 24 and 38 I get the right data.
When I make it a parameter Between [A] and it returns completely
different values, like a 3 year old.
I don't understand why it would give different results from typing the value
to using a parameter.
The strangest part is that it works in an older copy, but not here and it
has not changed.
I tried deleting the query and copying it from the copy that worked and it
still didn't work right.
Any suggestions,please?
Thanks,
Lori
am looking for any explanation possible.
The query has a field, dateofbirth and a field, age, that calculates from
date of birth. The formula is
datediff("yyyy",[dateofbirth],date())
+Int(format(date(),"mmdd")<format([dateofbirth],"mmdd")).
It calculates the age correctly.
I need to filter by this field for people between certain ages. If I type
the criteria Between 24 and 38 I get the right data.
When I make it a parameter Between [A] and it returns completely
different values, like a 3 year old.
I don't understand why it would give different results from typing the value
to using a parameter.
The strangest part is that it works in an older copy, but not here and it
has not changed.
I tried deleting the query and copying it from the copy that worked and it
still didn't work right.
Any suggestions,please?
Thanks,
Lori