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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color coding question Access 2007 1

Status
Not open for further replies.

eon5

Technical User
Dec 31, 2007
47
0
0
ZA
Hi,

Me.LoneID.BackColor = “then how do i look up the code for the specific color I want”

In Access 2003 “16777215” represented the color white but in 2007 “#FFFFFF”.

How do I use “#FFFFFF” in my coding?

eon5
 

For simple colors you can use constants, like

vbWhite
vbRed
vbBlue

and so forth. If you want to use a palette color, what I do is simply, in Design View, right click on a textbox, click on Fill Color, set it to the color I want. I then goto Properties and see what number Access has inserted into the textbox BackColor property and copy and paste it wherever.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
That is exactly how i have done it in 2003 but in 2007 the property text box ix display "#FFFFFF" instead of the 16777215 value.

Thus,
Me.LoneID.BackColor = 16777215
works perfectly but,
Me.LoneID.BackColor = #FFFFFF
gives me an error?

And this is the reading for light blue #8EA3BD, how am i suppose to know what numeric values it's representing or where can i look it up because this is also giving me an error

Me.LoneID.BackColor = #8EA3BD

Hope it makes sense

eon5
 
How are ya eon5 . . .

I don't have 2007, but [blue]decimal 16777215[/blue] is the same as [blue]hex FFFFFF[/blue] Since you've proved decimal values work, you need a hex to decimal conversion function. Unfortunately access doesn't have one, but the windows calculator performs the conversion directly. Using the calculator just build up a library of your favorites ...

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks AceMan, calculator was a good idea...works perfectly

eon5
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top