You can use VBA code as an alternative. Here is an example for setting the
backcolor of a text box. Note that I can add any number of Case statements:
Private Sub SetStatusColor()
'Set color display of txtStatus text box
Select Case txtElapsedDays.Value
Case 0 To 120 'Zero to 120 Days
txtStatus.BackColor = 32768 'Green
Case 121 To 180 '121 To 180 Days
txtStatus.BackColor = 65535 'Yellow
Case Is > 180 'Greater than 180 Days
txtStatus.BackColor = 255 'Red
Case Else '
txtStatus.BackColor = 12632256 'Grey
End Select
End Sub
Call the SetStatusColor subroutine wherever it makes sense. For example,
since I'm dealing with date entries, I make a call in the BeforeUpdate event
procedure for a text box name "txtStartDate":
Private Sub txtStartDate_BeforeUpdate(Cancel As Integer)
Call SetStatusColor
End Sub
And in Form_Current:
Private Sub Form_Current()
On Error GoTo ErrorHandler
Call DisplayChoices
Call SetStatusColor
Exit Sub
ErrorHandler:
MsgBox Err.Number & ": " & Err.Description
Resume Next
End Sub
Here is a KB article that shows how to use VBA code to achieve conditional
formatting in Access 97:
http://support.microsoft.com/kb/302705
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________