J
J
I have the following code and for some reason the counter variable
increments by 2 each time rather than 1. Myself and a friend have
looked at it but cannot figure out the problem, any help would be
appreciated with this. Text94 is a Yes/No Field if that makes any
difference
Dim c1 As Integer 'Global Variables
Dim c2 As Integer
Dim c3 As Integer
-----------------------------------------------------------------------------------------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Text24.value = 100 And Text94.value = -1 Then
c1 = c1 + 1
Else
If Text24.value = 100 And Text94.value = 0 Then
c2 = c2 + 1
Else
If Text24.value > 0 And Text24.value < 100 Then
c3 = c3 + 1
End If
End If
End If
End Sub
-----------------------------------------------------------------------------------------------------------------
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As
Integer)
Text67.value = CStr(c1)
Text68.value = CStr(c2)
Text85.value = CStr(c3)
End Sub
increments by 2 each time rather than 1. Myself and a friend have
looked at it but cannot figure out the problem, any help would be
appreciated with this. Text94 is a Yes/No Field if that makes any
difference
Dim c1 As Integer 'Global Variables
Dim c2 As Integer
Dim c3 As Integer
-----------------------------------------------------------------------------------------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Text24.value = 100 And Text94.value = -1 Then
c1 = c1 + 1
Else
If Text24.value = 100 And Text94.value = 0 Then
c2 = c2 + 1
Else
If Text24.value > 0 And Text24.value < 100 Then
c3 = c3 + 1
End If
End If
End If
End Sub
-----------------------------------------------------------------------------------------------------------------
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As
Integer)
Text67.value = CStr(c1)
Text68.value = CStr(c2)
Text85.value = CStr(c3)
End Sub