[englishlet] has a value 1 or 0 if a pupils grade is between A* and C
I have the following code to create a running total on the footer of a report
If [recordcount] = 1 Then [englishlet] = 0 'resets values to 0
If [recordcount] = 1 Then [eng total] = 0 'resets values to 0
[englishlet] = 0
If [english grade] = "A*" Then [englishlet] = 1
If [english grade] = "A" Then [englishlet] = 1
If [english grade] = "B" Then [englishlet] = 1
If [english grade] = "C" Then [englishlet] = 1
If [englishlet] = 1 Then [eng total] = [eng total] + 1
[eng total] is displayed on the footer the problem is the number displayed from [eng total] is 1 more than it should be e.g. on the first page of the report I have 24 A*-C and the [eng total] displays 25. On the second page the total A*-C is now 45 but [eng total] displays 47. This happens on every page of the report except for the last one for some strange reason.
Where is the extra 1 coming from each time. I tried displaying the [eng total] next to each record on the report and the correct numbers are displayed down the first page but when it displays on the footer and extra 1 has been added.
I apologise in for my crude programming but I am new to VB.
Thanks Matt
[This message has been edited by moulson (edited 07-20-2000).]
I have the following code to create a running total on the footer of a report
If [recordcount] = 1 Then [englishlet] = 0 'resets values to 0
If [recordcount] = 1 Then [eng total] = 0 'resets values to 0
[englishlet] = 0
If [english grade] = "A*" Then [englishlet] = 1
If [english grade] = "A" Then [englishlet] = 1
If [english grade] = "B" Then [englishlet] = 1
If [english grade] = "C" Then [englishlet] = 1
If [englishlet] = 1 Then [eng total] = [eng total] + 1
[eng total] is displayed on the footer the problem is the number displayed from [eng total] is 1 more than it should be e.g. on the first page of the report I have 24 A*-C and the [eng total] displays 25. On the second page the total A*-C is now 45 but [eng total] displays 47. This happens on every page of the report except for the last one for some strange reason.
Where is the extra 1 coming from each time. I tried displaying the [eng total] next to each record on the report and the correct numbers are displayed down the first page but when it displays on the footer and extra 1 has been added.
I apologise in for my crude programming but I am new to VB.
Thanks Matt
[This message has been edited by moulson (edited 07-20-2000).]