Changing the display of a text box control depending on criteria?

jobdone

Registered User.
Local time
Today, 19:16
Joined
May 9, 2013
Messages
17
So I've got a field called Date of Expiry for something.

Is it possible to change the text box on the form so that if that date of expiry is Today or Earlier instead of showing the date if shows "EXPIRED" or something similar?

Or would it be easier to just change the text box colour if it's expired?

Thanks for any help.
 
Last edited:
Changing the colour is easily achieved with conditional formatting. You would just need Field Value Is | less than or equal to | Date()

You could build a formula to use as the control source for the textbox and return EXPIRED or the date as appropriate BUT you would not be able to do anything with this field.
Code:
IIf([DateField]<=Date(),"EXPIRED",[DateField])
 
Changing the colour is easily achieved with conditional formatting. You would just need Field Value Is | less than or equal to | Date()

You could build a formula to use as the control source for the textbox and return EXPIRED or the date as appropriate BUT you would not be able to do anything with this field.
Code:
IIf([DateField]<=Date(),"EXPIRED",[DateField])

Ah, that second part is exactly what I'm looking for, thank you. The form is for display rather than data entry, so it doesn't matter that the user can't edit it.

Thank you :D
 

Users who are viewing this thread

Back
Top Bottom