bcooler
Programmer
- Jun 13, 2009
- 132
Thanks for reading!
I have a field called "Comments" where, oddly enough, I am keeping text that looks like a date (long story, just laugh and keep going...).
Now, I want to create a query that looks for records whose [date + 2 years] is older than today. In other words, if this field is the document review day, and we must re-review every 2 years, I want to know the documents that are overdue.
To obtain the date I used the following field, which attempts to covert the text to a date and add 2 years:
This works fine...well at least it gives a date that is 2 years after the initial date.
The problem is when I use criteria on this new date. If I say something like:
Then I get an error that says, "Data Type Mismatch in criteria expression."
What am I doing wrong? I am converting the text to a date, so it should be able to perform criteria on it....right? Or do I need to covert it first in one query, then perform criteria on it in another?
Thanks!
Brian
I have a field called "Comments" where, oddly enough, I am keeping text that looks like a date (long story, just laugh and keep going...).
Now, I want to create a query that looks for records whose [date + 2 years] is older than today. In other words, if this field is the document review day, and we must re-review every 2 years, I want to know the documents that are overdue.
To obtain the date I used the following field, which attempts to covert the text to a date and add 2 years:
Code:
ReviewDueDate: DateAdd("yyyy",2,CDate([Comments]))
This works fine...well at least it gives a date that is 2 years after the initial date.
The problem is when I use criteria on this new date. If I say something like:
Code:
<Date()
Then I get an error that says, "Data Type Mismatch in criteria expression."
What am I doing wrong? I am converting the text to a date, so it should be able to perform criteria on it....right? Or do I need to covert it first in one query, then perform criteria on it in another?
Thanks!
Brian