to sum a field on a subform that appears on a form.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Like in Northwind, I'm trying to sum up the items on a subform and have them
appear on the form. I did the expression builder to sum on that field and
placed that field in the footer of the subform. Then when I try to transfer
that to the form I get the NAME? error.
 
Make sure the name of the field is not the same as the control source.

| Like in Northwind, I'm trying to sum up the items on a subform and have
them
| appear on the form. I did the expression builder to sum on that field and
| placed that field in the footer of the subform. Then when I try to
transfer
| that to the form I get the NAME? error.
 
Like in Northwind, I'm trying to sum up the items on a subform and have them
appear on the form. I did the expression builder to sum on that field and
placed that field in the footer of the subform. Then when I try to transfer
that to the form I get the NAME? error.

The Control Source of the mainform textbox needs to reference the name
of the Subform control - which might not be the same as the name of
the Form object within that control - and the name of the textbox on
the subform's footer.

Let's say the name of the subform control is MySubform, and the name
of the textbox is txtSum. You'ld set the Control Source of the
mainform textbox to

=MySubform.Form!txtSum


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top