Conditional Color Formating

B

Bob N

I have an "Act-ID" field in my report, which I want to format differently
for each account, there are five (5) different accounts.

1. How do I refer to:
a. Background & Color
b. Foreground & Color

2. On Microsoft Msdn help; I found some code using RBG() as follows:

RBG(255, 0, 0)
RGB(255, 255,255)
RGB(0, 0 , 0,)
RGB(255, 255, 0)

What do each of these refer to?

3. Can I use a sub using the Select Case Structure, and to what property
should I attach it ?


4. Where can I find the color (names / referecneses to the colors in the
color builder?

I am new to Access, but am an OLD Dbase programmer.

Thanks for any help!!!
 
A

Al Campagna

Bob,
What version are you using?
At 2003 and after, conditional formatting was added to form
and reports.

In reports, color changes to data can also be handles during the
OnFormat event of the report section where your controls are located.

You can control color in several ways...
Examples of setting a black Background
[SomeFieldName].Backcolor = RGB(000,000,000)
(see Help under RGB Function)
or
[SomeFieldName].Backcolor = vbBlacks
(see Help under Color Constants)
or
[SomeFieldName].Backcolor = QBColor(0)
(see Help under QBColor Function)
or
[SomeFieldName].Backcolor = 0
(use the windows color palette)

The numbers within the RGB parentheses are values of
amounts of Red, Green, Blue... the values of which determine all colors
from white RGB(255,255,255) to black RGB(0,0,0)
- -
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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

Top