PC Review


Reply
Thread Tools Rate Thread

Change Forecolor based upon if statement

 
 
rbb101
Guest
Posts: n/a
 
      17th May 2010
On a form I have two controls named [Con1] and [Con2]. On Exit of a third
control [ConComm], I am trying to change the font of Label304 only if [Con1]
And [Con2] are Not empty or Not Null.

So If both [Con1] and [Con2] have entries,
then Me.Label304.Forecolor=50787 Else (if there are no entries)
Me.Label304.Forecolor= 6697728

 
Reply With Quote
 
 
 
 
rbb101
Guest
Posts: n/a
 
      18th May 2010
Thanks. Thats exactly what I was looking for.

"Marshall Barton" wrote:

> rbb101 wrote:
>
> >On a form I have two controls named [Con1] and [Con2]. On Exit of a third
> >control [ConComm], I am trying to change the font of Label304 only if [Con1]
> >And [Con2] are Not empty or Not Null.
> >
> >So If both [Con1] and [Con2] have entries,
> >then Me.Label304.Forecolor=50787 Else (if there are no entries)
> >Me.Label304.Forecolor= 6697728

>
>
> If the for is displayed in single view, you can use VBA code
> to do that:
>
> If Not IsNull(Con1) And NotIsNull(Con2) Then
> Me.Label304.Forecolor=50787
> Else 'if there are no entries
> Me.Label304.Forecolor= 6697728
> End If
>
> --
> Marsh
> MVP [MS Access]
> .
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change different cell based on conditional statement FoxIII Microsoft Excel Worksheet Functions 4 30th Dec 2008 02:00 PM
Change Cell Color Based on IF Statement =?Utf-8?B?Q2F0aHk=?= Microsoft Excel Worksheet Functions 3 16th Dec 2005 08:57 PM
Report: Change forecolor based on a condition Color Microsoft Access Reports 1 5th Dec 2003 08:30 PM
How to change cell colors based on an IF statement formula? Tom Woolman Microsoft Excel Misc 4 21st Nov 2003 08:02 PM
How to change cell colors based on an IF statement formula? Tom Woolman Microsoft Excel Programming 3 21st Nov 2003 07:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 PM.