Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Location
    UK
    Posts
    160

    Unanswered: Summing Text boxes from different subforms

    Hello again,

    I am trying to display the total price of a quote. I have several subforms which adds up the subtotal in the footer. i used =Sum([Sub_parts]) for example to add up all my parts and in another subform =Sum([Labor])

    I would like to add all the subtotals to display a total price.

    I have managed to pickup one of the subtotals by using the following code in the Control Source property =frm_sub_parts.Form!Parts_Subtotal and this appears to work fine. I would like to add the remaining subtotal but don't know how?

    thanks in advance
    marcus

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    A simple addition should do the trick:
    Code:
    =frm_sub_1.Form!SubTotal + frm_sub_2.Form!SubTotal + ... + frm_sub_n.Form!SubTotal
    Personally, I would use a fully qualified notation for referring to the objects:
    Code:
    =Me.frm_sub_1.Form.SubTotal.Value + Me.frm_sub_2.Form.SubTotal.Value + ... + Me.frm_sub_n.Form.SubTotal.Value
    Usually it's not necessary, though.
    Have a nice day!

  3. #3
    Join Date
    Sep 2010
    Location
    UK
    Posts
    160
    thanks Sinndho. couldn't think...brain fried

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •