• Calculate data on a subform; view in main form

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Calculate data on a subform; view in main form

    Author
    Topic
    #485106

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #1347340

      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”.

      • #1347341

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

    Viewing 0 reply threads
    Reply To: Calculate data on a subform; view in main form

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: