Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need a list of the values for backcolors and forecolors

Status
Not open for further replies.

torf66

Programmer
Jun 10, 2003
43
US
Is there a list someone can give me of the background colors
and forecolors values? For example a value is backcolor=255 255 is red 0 is black. Some values are 65536 which shows as green and 1672553 shows as red. If someone out there has a list that would be great to get.
Thanks,
Todd ttorfin@dakcl.com
 
torf66

I cheat for this.

Setup a test field in a form. Set the properties you want, including colour for the background and foreground.

Then look at the porperties for the field. Under background and foreground, you will see a long number. You can use this number to assign the colours you want to the form.

For example...

Dim lngAlert As Long, lngAmber As Long, lngGo As Long

lngAlert = 255
lngAmber = 8454143
lngGo = 65280

(Red, Yellow, Green "stop light" colours used on a sample form)

I got the long numbers from setting a text field to red, yellow and green. Grabbed the numbers from the back ground property and pasted them into my code.

Richard

 
Yeah, I cheat the same way. There are millions of colors out there, so it's impossible to memorize all of them. I just use the color selecter to find a color I like then I just write down the number and use it in my code.

BTW, Access does already have pre-defined constant names for a few of the colors. VBRed = red, VBBlue = blue, etc.
I'm sure you can find a complete list in Access help somewhere.

Maq [americanflag]
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top