sum in subform

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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.
 
Back
Top