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.
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")

Signature
Dave Hargis, Microsoft Access MVP
> 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.
Cindy - 29 Nov 2007 16:12 GMT
Thank you
> 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
[quoted text clipped - 8 lines]
> > but just can't remember what it was. (must be getting old). Can someone help
> > please.