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 formatting



 
 
Thread Tools Display Modes
  #1  
Old June 25th, 2004, 04:45 PM
AusTexRich
external usenet poster
 
Posts: n/a
Default Conditional formatting

Is not available for Option Groups controls and their labels.

Anyone have sample code to change the Backcolor of a label based on the selection in an option group?


  #2  
Old June 25th, 2004, 09:52 PM
fredg
external usenet poster
 
Posts: n/a
Default Conditional formatting

On Fri, 25 Jun 2004 08:45:45 -0700, AusTexRich wrote:

Is not available for Option Groups controls and their labels.

Anyone have sample code to change the Backcolor of a label based on the selection in an option group?


In Single Form View .....
Code the Form's Current event as well as the Option Group's
AfterUpdate event:

If Me!OptionGroupName = 1 Then
Me!LableName.BackColor = vbRed
ElseIf Me!OptionGroupName = 2 Then
Me!LableName.BackColor = vbBlue
Else
Me!LableName.BackColor = vbWhite
End If

Make sure the label's BackStyle property is set to Normal.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Carry over conditional formatting Justin Mailmerge 3 May 22nd, 2004 10:41 AM
Greater than formulas with conditional formatting Jamie New Users 1 May 21st, 2004 04:32 AM
Conditional Formatting Questions Andy B Worksheet Functions 1 May 12th, 2004 02:48 PM
Conditional Formatting on a cell that has an IF function DDM Worksheet Functions 0 May 11th, 2004 05:13 PM
MIN value exclude '0' & Conditional Formatting JEM Worksheet Functions 5 April 16th, 2004 03:40 AM


All times are GMT +1. The time now is 12:21 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.