constant date criteria

P

pow67

In my Access97 db

[VERIFIED] = date field

In many queries, I use the following criteria for [VERIFIED] to select
certain data:
Date()-365

I would like to replace "365" with a constant value such as "ExpDate" so
that I only need to change the value of "ExpDate" in order to change the
value in all my queries.

I created the following module:

Public Const ExpDate = 365

but when I changed my query to read:
Date()-ExpDate

it produced an error message that read:

"data mismatch"

Do I have to declare "ExpDate" somewhere in the query?

Thanks in advance

CW.
 
P

pow67

Thanks for the direction. I am still receiving an error of data mismatch
but I will continue to work.

I did not even know you could create a "public function" and call it in
a query.

Thanks again.
CW
 
Top