Changing subform background colour

shafara7

Registered User.
Local time
Today, 10:06
Joined
May 8, 2017
Messages
118
Hi, how do I make coloured background for each record. See photo.
The colour depends on the task assigned on the records.
For example, when the task is set to Analysis, it will turn blue, when others, the background is normal.

Does it have to do with the following codes?
Code:
Private Sub Form_Current()
    txtBackColor.FormatConditions(0).Modify acExpression, acEqual, "[lngMessauftragNr]=" & Me![lngMessauftragNr]
    txtBackColor.FormatConditions(0).Enabled = False
End Sub

If so, I understand how it change it to blue when Analysis is selected because the code does not say any conditions.
I also checked that it does not use the Background Format Tool.
 

Attachments

  • Subform Background Colour.PNG
    Subform Background Colour.PNG
    11.4 KB · Views: 92

Users who are viewing this thread

Back
Top Bottom