G
Guest
I want to modify the look of certain controls depending on their value (ie.
highlight the bad ones).
Using both the Detail_Format & Detail_Print Events I discovered that the
"Me.Detail.Controls.Count" property always has a zero(0) in it regardless of
the number of controls on the detail line of the report. Is there anyway to
populate this property?
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim i As Integer
Dim stwk As String
* Me.Detail.Controls.Count = 0
* Code Does Not Execute
For i = 0 To Me.Detail.Controls.Count - 1
stwk = Left(Me.Detail.Controls(i).Name, 17)
If stwk = "CurrYrFailureRate" Then
If Me.Detail.Controls(i).Value > 19.9 Then
Me.Detail.Controls(i).BackStyle = 0
Me.Detail.Controls(i).BorderStyle = 0
Else
Me.Detail.Controls(i).BackStyle = 1
Me.Detail.Controls(i).BorderStyle = 1
End If
End If
i = i + 1
Next
End Sub
Thanks for Your Help; Dean
highlight the bad ones).
Using both the Detail_Format & Detail_Print Events I discovered that the
"Me.Detail.Controls.Count" property always has a zero(0) in it regardless of
the number of controls on the detail line of the report. Is there anyway to
populate this property?
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim i As Integer
Dim stwk As String
* Me.Detail.Controls.Count = 0
* Code Does Not Execute
For i = 0 To Me.Detail.Controls.Count - 1
stwk = Left(Me.Detail.Controls(i).Name, 17)
If stwk = "CurrYrFailureRate" Then
If Me.Detail.Controls(i).Value > 19.9 Then
Me.Detail.Controls(i).BackStyle = 0
Me.Detail.Controls(i).BorderStyle = 0
Else
Me.Detail.Controls(i).BackStyle = 1
Me.Detail.Controls(i).BorderStyle = 1
End If
End If
i = i + 1
Next
End Sub
Thanks for Your Help; Dean