VB problem on a report (its a strange one)

moulson

New member
Local time
Today, 07:59
Joined
Jul 17, 2000
Messages
6
[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

I am getting the extra 1 added to [eng total] and I can't figure out where its coming from! It was suggested the the * character may cause a problem but I have removed this and the problem still occures! [eng total] is displayed in the footer and the 1 is added at this point

e.g. [eng total] = 22 at last record on the report. then in the footer [eng total] = 23

But this does'nt always happen some pages it is Ok and some it adds 1! I have no idea why!

If you can offer any help the would be great.

Many Thanks

Matt Moulson

[This message has been edited by moulson (edited 09-13-2000).]
 
I tried the above but it did'nt seem to have any affect.

The formatcount = 1 when each record is displayed and when the footer is displayed as well.

I did play around with it for some time but no joy.

It might be me using the formatcount wrongly

please advise!!

Thanks

Matt
 
I don't understand what you mean by this:

me.txtTotal = [eng total]

assuming txtTotal is the control name of the field where the total will be displayed.

[eng total] is the control name where the total is displayed.

Please tell me where I'm going wrong as I'm supposed to finish this project in the next few days!

Thanks again

Matt
 

Users who are viewing this thread

Back
Top Bottom