Sharon Hague
Registered User.
- Local time
- Today, 10:33
- Joined
- Jul 10, 2003
- Messages
- 138
Hi All
I'm not too good with VBA so I would appreciate it if somebody could tell me what I am doing wrong with the following: -
I have a form with a label called Holidays Available. This is worked out from a label called Holiday Entitlement - Holidays Taken.
I want the label Holidays Availble to be displayed in red if this < 0.
Therefore I have entered the following code in the afterupdate properties of this lable as follows: -
Private Sub Holidays_Available_AfterUpdate()
If Me.Holidays_Available < 0 Then
Me.Holidays_Available.FontBold = True
Me.Holidays_Available.ForeColor = vbRed
Else
Me.Holidays_Available.FontBold = False
Me.Holidays_Available.ForeColor = vbBlack
End Sub
When I view this form and there is a - figure displayed it still remains black instead of red.
Can anybody help?
Cheers
I'm not too good with VBA so I would appreciate it if somebody could tell me what I am doing wrong with the following: -
I have a form with a label called Holidays Available. This is worked out from a label called Holiday Entitlement - Holidays Taken.
I want the label Holidays Availble to be displayed in red if this < 0.
Therefore I have entered the following code in the afterupdate properties of this lable as follows: -
Private Sub Holidays_Available_AfterUpdate()
If Me.Holidays_Available < 0 Then
Me.Holidays_Available.FontBold = True
Me.Holidays_Available.ForeColor = vbRed
Else
Me.Holidays_Available.FontBold = False
Me.Holidays_Available.ForeColor = vbBlack
End Sub
When I view this form and there is a - figure displayed it still remains black instead of red.
Can anybody help?
Cheers