active date field

C

Cindy

I have a date field called "enddate" and a field called "active".
I want to make it so if the enddate is before today to put "no" in the
active field, and if greater than today to put "yes" in the active field. I
have done it in a query many times before and know it was something simple
but just can't remember what it was. (must be getting old). Can someone help
please.
 
K

Klatuu

This is the basic logic to use in your query. There is one issue. You said
< Date = no and > Date = Yes. What about enddate = Date, you don't allow for
that.

IIf([enddate] < Date(), "no","yes")
 
C

Cindy

Thank you

Klatuu said:
This is the basic logic to use in your query. There is one issue. You said
< Date = no and > Date = Yes. What about enddate = Date, you don't allow for
that.

IIf([enddate] < Date(), "no","yes")
--
Dave Hargis, Microsoft Access MVP


Cindy said:
I have a date field called "enddate" and a field called "active".
I want to make it so if the enddate is before today to put "no" in the
active field, and if greater than today to put "yes" in the active field. I
have done it in a query many times before and know it was something simple
but just can't remember what it was. (must be getting old). Can someone help
please.
 
Top