If statement for date

TClark14

Registered User.
Local time
Today, 06:26
Joined
Sep 28, 2001
Messages
85
I have a field containing a date. In my form I want a calculated field where it will look at the date and either show "Expired" or "Current" depending on if the date in the field is less than today's date. Something like this
If "date" is <NOW(), expired, current

Obviously I am not getting the formula right

Can someone help with this?

Thanks
Terry
 
=Iif([MyDateField]<Date(),"Expired","Current") don't have a field named Date by the way, it's a reserved word in aCCESS
 
Thanks

That worked perfectly. My field isn't actually "date", I just used it as an example to shorten my message.

Thanks for the help!
 
Expired or Current

If I want to say that this box will show expired if not within one year of date entered or else it will show current how would that look like. This is obiviously incomplete or way off bat. Thanks




=IIf([Hepatitis A Taken]<DateAdd("yyyy",1,[Hepatitis A Taken]),"Current")) Or Iif([Hepatitis A Taken]>DateAdd("yyyy",1,[Hepatitis A Taken,"Expired"))
 

Users who are viewing this thread

Back
Top Bottom