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

Conditional Formatting.

Status
Not open for further replies.

Hammondo

MIS
Jan 14, 2002
23
0
0
NL
I have Access 2000. Is there a way to assign more then three different types of Conditional Formatting to a field on a Form? Ideally I need five.
 
depends on what you are trying to accomplish, but you can use a Select Case statement in the Form's Current Event, as in this example

Private Sub Form_Current()
Select Case Left(txt1, 1)
Case "1"
txt1.ForeColor = vbRed
Case "2"
txt1.ForeColor = vbCyan
Case "3"
txt1.ForeColor = vbGreen
Case "4"
txt1.ForeColor = vbBlue
Case Else
txt1.ForeColor = vbBlack
End Select
End Sub

PaulF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top