View Full Version : Using Sum


Craig
06-12-2001, 10:59 AM
I am currently working on a subform which is used for recording numerical information. In the subform footer I am totaling the figures for each field. The fields contain exprsssions for calculations. I do know that you have to recalculate the total field i.e Sum[expr] to enable it to calculate the total sum. However when it comes to the the field I am trying to Sum which has the following expression:-

=IIf(Nz([e21]) And Nz([e22])>=14.7,(Nz([Ra]*6)+Nz([Ac]*8)+Nz([pb]*3)))

It does not work and only creates errors in all fields that are doing the Sum.

Does anyone have any ideas on how to correct this error.


Craig

charityg
06-12-2001, 11:10 AM
Where is your else statement? Right now I see

If Nz([e21]) And Nz([e22])>=14.7 then
yourfield=(Nz([Ra]*6)+Nz([Ac]*8)+Nz([pb]*3))
else
your field=what?
end if

I'm not saying this is the cause of all of your problems, but it's a start