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!

Display a Cell Colour

Status
Not open for further replies.

aph

Technical User
Jul 8, 2000
134
GB
I have a table that has the Pantone, R,G,B and hex reference numbers for a given colour.
Is is possible to create a query that will add the R G B values together but then display a image/cell colour of the result of the calculation?? That can then be diplayed on screen in a Form??
 
You can dynamically set the color of most controls on forms. It would be near impossible to do this on a continuous form. A report could possibly work.

The following code in the On Current event will color a rectangle (boxColor) based on three fields.
Code:
Private Sub Form_Current()
    Me.boxColor.BackColor = RGB(Me.R, Me.B, Me.G)
End Sub

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top