Total Column

on-2

Registered User.
Local time
Today, 04:02
Joined
Nov 24, 2002
Messages
34
Totalling A Column In A Report

I have used vb to calculate unbound text boxs using i.e.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If [qandm] = "m" Then [iv] = Null
If [qandm] = "q" Then [iv] = [boughtat] * 7 / 47
End Sub

I cant seem to work out how to do a total at the end of the report though?
have tried
If [qandm] = "q" Then [textbox] = Sum([boughtat] * 7 / 47)
but it doesnt seem to gel. Anyone got any ideas.
Cheers Alex
 
=Sum(Iif[qandm] = "q",[boughtat] * 7 / 47,0)) in an unbound text box in the Group/Report footer
 
thank you rich, i popped in
[ppnt] =sum(Iif[qandm]="q",[boughtat] * 7 / 47,0)) and it comes up compile error? so im still a bit stuck if you can help..
was wondering i know its unbound so i cant use access to sum the text box [iv] but is there a twist on using it in vb to make it simple i.e. [ppnt]=sum([iv]) in the report footer?
 
just set the control source of the textbox to the formula it doesn't need vba
 

Users who are viewing this thread

Back
Top Bottom