A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Conditional format of a control



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2010, 10:26 PM posted to microsoft.public.access.forms
Toller[_2_]
external usenet poster
 
Posts: 5
Default Conditional format of a control

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


  #2  
Old April 29th, 2010, 11:40 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default Conditional format of a control

On Thu, 29 Apr 2010 14:26:01 -0700, Toller wrote:

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.


--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old April 30th, 2010, 02:05 AM posted to microsoft.public.access.forms
Toller[_2_]
external usenet poster
 
Posts: 5
Default Conditional format of a control

Thanks. Never would have thought of that.

Eric
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.