Conditional format of a control

  • Thread starter Thread starter Toller
  • Start date Start date
T

Toller

I have a form that among other things has on it a field called 'EndDate". I
need to add a field that will be conditionally formatted. If the Date is
greater than Enddate, the field is to contain the text "Expired" in red. If
not, the field is to be a blank and transparent. IOW, if the condition is
met, red letters but otherwise, it just disappears.

The field is not in the database. It's for display only.

I've spent 2 hours trying all sorts of things to no avail. How can this be
done?

Thanks.

Eric
 
I have a form that among other things has on it a field called 'EndDate". I
need to add a field that will be conditionally formatted. If the Date is
greater than Enddate, the field is to contain the text "Expired" in red. If
not, the field is to be a blank and transparent. IOW, if the condition is
met, red letters but otherwise, it just disappears.

The field is not in the database. It's for display only.

I've spent 2 hours trying all sorts of things to no avail. How can this be
done?

Thanks.

Eric

Set the control's control source to
="Expired"
Set it's forecolor to Red.
Click on Format + Conditional Formatting
Set Condition1 to
Expression Is Date()<[EndDate]
Set the Condition's ForeColor to White (or whatever the control's back
color is).
Save the changes.
 
Back
Top