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

How to set the colorindex for the label?

Status
Not open for further replies.

softlover

Programmer
Apr 4, 2002
88
CN
I want set the different color for two labels, but I can't found the way. The following codes not supported by the ACCESS2K.
With .Text1
.Font.ColorIndex = 3
End With
 
Hi softlover,

That looks like Excel syntax. Take a look at the ForeColor Property of the Label Control.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Yeah. Forecolor is the way to go.
For simple colors, try syntax such as
text1.forecolor = QBColor(3)

For more complex colors, you specify the RGB value, usually shown as a hex number

eg text1.forecolor = &hffcc00

Colors that begin with &h80nnnnnn are system colors, like 'buttonface' and the like.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top