Date check

  • Thread starter Thread starter ND
  • Start date Start date
N

ND

I have 2 date fields in my table/form to capture 2
possible expiration dates. If either of those dates is
<current date I want to set an unbound text field to read
Expired otherwise it should read Active. If both fields
are blank the text box should display "?". Help! I don't
know how to accomplish this. Thanks in advance.
 
Try something like this in the Control Source of your text box:

=Switch(([Date1] < Date()) OR ([Date2] < Date()), "Expired",
([Date1] Is Null) AND ([Date2] Is Null), "?",
True, "Active")
 
Thank you very much!
-----Original Message-----
Try something like this in the Control Source of your text box:

=Switch(([Date1] < Date()) OR ([Date2] < Date ()), "Expired",
([Date1] Is Null) AND ([Date2] Is Null), "?",
True, "Active")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I have 2 date fields in my table/form to capture 2
possible expiration dates. If either of those dates is
<current date I want to set an unbound text field to read
Expired otherwise it should read Active. If both fields
are blank the text box should display "?". Help! I don't
know how to accomplish this. Thanks in advance.


.
 
Back
Top