Change "Back colour" based on criteria

Here's the sample - fixed - with the function.
 

Attachments

Just as I suspected - the Conditional Formatting WILL work if you change the text box's BACK STYLE property from TRANSPARENT to NORMAL. They are all currently set to TRANSPARENT.

Holy S:eek:T .... That was it! Thank you!
 
For future googler, if you want a text box (in this case "ID") to change color based on another text box (in this case "Status") use:

Select Case Me.[Status]
Case "Closed"
Me.ID.BackColor = 12632256
Case Else
Me.ID.BackColor = 16777215
End Select
 
Thanks that helped me do what I wanted except that I want other text boxes to change color based as well based on the value of the original one. The other text box I want to change as well is called Meeting.

Thanks in advance

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
FormatStatus

End Sub

Private Sub Detail_Paint()
FormatStatus

End Sub
Function FormatStatus()

If Me.Status = 2 Then
Me.Status.BackColor = 13777215

End If

If Me.Status = 1 Then
Me.Status.BackColor = 15777215

End If


End Function
 
that was 10 years ago.
you should create new thread.
otherwise, if the condition of your report is
also based on Status field, you just add them
to the function

Function FormatStatus()

If Me.Status = 2 Then
Me.Status.BackColor = 13777215
Me.Meeting.BackColor=13777215
End If

If Me.Status = 1 Then
Me.Status.BackColor = 15777215
Me.Meeting.BackColor = 1777215
End If


End Function
 

Users who are viewing this thread

Back
Top Bottom