sum in subform

G

Guest

I have a form with a subform and under the sub form i have a subsubform. on
this subsubform i would like to do a sum. i got this message "#fault"
It works with one subform but can I do it one level lower?
 
S

SusanV

You can sum from other subforms, but you have to be very explicit in
referring to them. The following is from
http://cma.zdnet.com/book/masteringaccess/aba13fi.htm


Referring to Subform Controls

Many developers do not know how to properly refer to subform controls. You
must refer to any objects on the subform through the subform control on the
main form. Here's an example:


Forms!frmCustomer!fsubOrdersThis example refers to the fsubOrders control on
the frmCustomer form. If you want to refer to a specific control on the
fsubOrders subform, you must then point at its controls collection. Here's
an example:


Forms!frmCustomer!fsubOrders.Controls!txtOrderIDThis code refers to the
txtOrderID control on the form contained within the fsubOrder control on the
frmCustomer form. To change a property of this control, you would extend the
syntax to look like this:


Forms!frmCustomer!fsubOrders.Controls!txtOrderID.Enabled = FalseThis code
sets the Enabled property of the txtOrderID control on the form contained
within the fsubOrders control to False.
 
G

Guest

Thank you, I hade a bad name for a field. changeing this and it works.

"SusanV" skrev:
 

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

Top