• subform not totalling

    Author
    Topic
    #463244

    I have a subform with a currency field called WkAmt. I have a totaling box on the footer, txtWkTot, of the subform with a controlsource of =Sum([WkAmt]) so that I can refer to it on the main form with =[sbfrmPledge].[Form]![txtWkTot]

    For some reason I am getting #error in both the footer of the subform and, obviously, the box on the main form.

    Any ideas about where to look for the cause. It’s not like I haven’t done this lots of times before but for some reason, I am obviously missing something. WkAmt is not calcuated or derived, you just enter a number. I started with the subform displaying as continuous forms. I’ve tried changing it to datasheet which is how I usually do it to no avail.

    Viewing 0 reply threads
    Author
    Replies
    • #1181844

      Is the name of the control on the subform bound to the WkAmt field also WkAmt?
      If not, is there another control named WkAmt?

      One other thing: have you checked whether the values of WkAmt in the source table are still OK?

      • #1181846

        Is the name of the control on the subform bound to the WkAmt field also WkAmt?
        If not, is there another control named WkAmt?

        One other thing: have you checked whether the values of WkAmt in the source table are still OK?

        Just a thought, this can also be caused by another total in a footer being wrong.
        I have noticed in Access that if there are a couple of totals and one of them yields an error, that will often all yield an error.

        • #1181870

          Just a thought, this can also be caused by another total in a footer being wrong.
          I have noticed in Access that if there are a couple of totals and one of them yields an error, that will often all yield an error.

          I’ll check out this possibility when I am back at the office. Thanks for the suggestion.

        • #1182341

          Just a thought, this can also be caused by another total in a footer being wrong.
          I have noticed in Access that if there are a couple of totals and one of them yields an error, that will often all yield an error.

          Hi Andrew:

          Thanks for the suggestion. This was actually what the problem was. My second totally column was WkAmt * 52 and I was just summing this calculated amount. Access didn’t like that. Once I changed the formula to calculate in the total box =Sum([WkAmt]*52) then the errors went away.

      • #1181869

        Is the name of the control on the subform bound to the WkAmt field also WkAmt?
        If not, is there another control named WkAmt?

        One other thing: have you checked whether the values of WkAmt in the source table are still OK?

        Thanks for this. There is a possibility that this might be the problem. I was doing some copying and pasting and other similar stuff and I might have ended up with two controls named WkAmt. I can say with certainty that the values in WkAmt are OK in the source table since I was just creating this form today and there are only 7 test values which I added while I was working. Is there any possibility that other calculated fields on the form detail level could be messing up the subtotal? There is another control that takes the value of WkAmt and multiplies it times 52 for a Yearly amount (wk being Week).

        Regardless this gives me some food for thought and I will pursue it when I am back in the office on Tuesday.

    Viewing 0 reply threads
    Reply To: subform not totalling

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

    Your information: