sportsguy
Finance wiz, Access hack
- Local time
- Today, 13:03
- Joined
- Dec 28, 2004
- Messages
- 358
I am trying to color all controls which have a value of 0 as grey, to be less obvious to the observant's eye, and the remaining controls with the values greater than ZERO as black. . .
ctlDetail.Value = 0 doesn't work, what am i missing??
Thanks in advance
sportsguy
ctlDetail.Value = 0 doesn't work, what am i missing??
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' Change Color to Grey for all controls which equal ZERO
For Each CtlDetail In Me.Detail.Controls
If CtlDetail.Value = 0 Then
With CtlDetail
.ForeColor = vbGrey
.FontBold = False
End With
Else
With CtlDetail
.ForeColor = vbBlack
.FontBold = False
End With
End If
Next
End Sub
Thanks in advance
sportsguy