Connecting Tech Pros Worldwide Forums | Help | Site Map

SUM in form footer !

prakashwadhwani@gmail.com
Guest
 
Posts: n/a
#1: Aug 6 '07
I have a continuous form with 2 fields OPBAL and INIT_BAL as the
control source.

In the form footer, for their totals I have 2 text boxes having
=Sum([OPBAL]) and =Sum([Init_Bal]) as their control source.

This works fine !


If however, on the form I change the name of the fields to Txt_OPBAL
and Txt_Init_Bal
the sum in the footer which I now change to Sum([Txt_OPBAL]) and
Sum([Txt_Init_Bal]) shows an ERROR#.


Is it imperative that to get a total in the form footer both, the
Control Source and NAME should be the same ?

Rgds,
Prakash.


Allen Browne
Guest
 
Posts: n/a
#2: Aug 6 '07

re: SUM in form footer !


You can sum a field in the form's RecordSource.
You cannot sum a control.

Therefore your expression needs to refer to the field name (typically what
you put in the control's Control Source), not the control name.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<prakashwadhwani@gmail.comwrote in message
news:1186400970.946584.99250@o61g2000hsh.googlegro ups.com...
Quote:
>I have a continuous form with 2 fields OPBAL and INIT_BAL as the
control source.
>
In the form footer, for their totals I have 2 text boxes having
=Sum([OPBAL]) and =Sum([Init_Bal]) as their control source.
>
This works fine !
>
>
If however, on the form I change the name of the fields to Txt_OPBAL
and Txt_Init_Bal
the sum in the footer which I now change to Sum([Txt_OPBAL]) and
Sum([Txt_Init_Bal]) shows an ERROR#.
>
>
Is it imperative that to get a total in the form footer both, the
Control Source and NAME should be the same ?
>
Rgds,
Prakash.
>
Closed Thread


Similar Microsoft Access / VBA bytes