Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculate data on a subform; view in main form

    I need to calculate a total on a sub-form, then pass that total to the main form for viewing. It is giving me problems. I am attaching the db. Could you explain what I am doing wrong, please.

    Trouble - I can't attach the file! It is a .rar file.

    I will try to explain.

    The main file is frmManufacturers, and the sub is subfrmComputers. I created a total in the subfrm footer called SumPurchasePrice. In the main form I created a control with the statement =[Formulario]![frmManufacturers]![subfrmComputers].[Formulario]![SumPurchasePrice].

    Please give me a hand.

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,340
    Thanks
    1
    Thanked 18 Times in 18 Posts
    You didn't specify what exactly your are encoutering when you say "it is give me problems". Errors? Not always the correct value? what?

    First, make sure you are actually referencing the subform by the name of the subform control, not the actual name of the form object. Depending on how you created the subform control, they could be different.

    Then, it is possible you will need to requery the control on the mainform.

    Lastly, I'm not sure the reference is correct. In English, it would be:
    =[Forms]![frmManufacturers]![subfrmComputers].[Form]![SumPurchasePrice]

    Note the difference in that "Forms" is used, and the other just "Form".
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Data on a sub-form

    It was the form vs forms that got me. Thanks a million for the help.

Posting Permissions

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