S
sross81
Hello,
In the database that I use which is an out of the box system the date of
birth is stored as text. I want to be able to have a field that calculates a
persons age based on the current date and then filters the age to only
include patients in a certain age range. I can get the calculation to occur
and it looks right but when I filter it I still get a datatype mismatch error
so I don't think its completely converting the age to a # although it looks
like a number. Here is what I have in my Access query to convert it.
Age:
CInt(DateDiff("yyyy",CVDate(Format([date_of_birth],"0000\/00\/00")),(Now())))
Then in another query I use the query that does the calculation and I filter
age in the criteria saying >=52 and <=69 but it errors out.
What am I doing wrong??
In the database that I use which is an out of the box system the date of
birth is stored as text. I want to be able to have a field that calculates a
persons age based on the current date and then filters the age to only
include patients in a certain age range. I can get the calculation to occur
and it looks right but when I filter it I still get a datatype mismatch error
so I don't think its completely converting the age to a # although it looks
like a number. Here is what I have in my Access query to convert it.
Age:
CInt(DateDiff("yyyy",CVDate(Format([date_of_birth],"0000\/00\/00")),(Now())))
Then in another query I use the query that does the calculation and I filter
age in the criteria saying >=52 and <=69 but it errors out.
What am I doing wrong??