Conditional Formatting: Custom BackColor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to use colors other than the set in the color picker to set a
control's back color in conditional formatting?

Access 2003.

Thanks very much,

Tom
 
Hi, Tom.

I don't believe there is, but you can always set the color in an event, such
as the control's AfterUpdate event, or the form's On Current event, e.g.,

Select Case Me!MyControl
Case =3
Me!MyControl.ForeColor = 16743545 'Periwinkle
Case >5
Me!MyControlForeColor = 13298862 'Lime Green
Case Else
Me!MyControlForeColor = 1213292 ' Olive Green
End Select

The same could be done for the BackColor.

HTH
Sprinks
 
AFAIK you cannot change the colors contained in the palette of the CF UI
Dialog. Instead you will need to programmatically set the
FormatConditions object. In this manner you can specify any color value
you desire.
See:
http://www.lebans.com/conditionalformatting.htm


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks to you both for responding. Due to laziness, I was hoping to avoid
having to code it (just kidding), but if that's the only way, then so be it.

Thanks again for your help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top