K
kirstie adam
Hi All,
I have a field on my form called [Status of Order]
I want it to change color dependant on what it says in it:
Contract Complete = green
Shortfalls Outstanding = red
Contra Charges = red
On Hold = orange
I am using the following code and can't get it to work:
Private Sub Form_Open(Cancel As Integer)
If Me.Status_of_Order = "On Hold" Then
Me.Status_of_Order.BackColor = 33023
ElseIf Me.Status_of_Order = "Contract Complete" Then
Me.Status_of_Order.BackColor = 65280
ElseIf Me.Status_of_Order = "Contra Charges" Then
Me.Status_of_Order.BackColor = 255
ElseIf Me.Status_of_Order = "Shortfalls Outstanding" Then
Me.Status_of_Order.BackColor = 255
Else
End If
End Sub
I can't use conditional formatting as i can only apply 3 rules to it, and i
need 4.
Can someone tell me wht i am doing wrong please?
Thanks,
Kirstie
I have a field on my form called [Status of Order]
I want it to change color dependant on what it says in it:
Contract Complete = green
Shortfalls Outstanding = red
Contra Charges = red
On Hold = orange
I am using the following code and can't get it to work:
Private Sub Form_Open(Cancel As Integer)
If Me.Status_of_Order = "On Hold" Then
Me.Status_of_Order.BackColor = 33023
ElseIf Me.Status_of_Order = "Contract Complete" Then
Me.Status_of_Order.BackColor = 65280
ElseIf Me.Status_of_Order = "Contra Charges" Then
Me.Status_of_Order.BackColor = 255
ElseIf Me.Status_of_Order = "Shortfalls Outstanding" Then
Me.Status_of_Order.BackColor = 255
Else
End If
End Sub
I can't use conditional formatting as i can only apply 3 rules to it, and i
need 4.
Can someone tell me wht i am doing wrong please?
Thanks,
Kirstie