Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    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?

  3. #3
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    [quote name='HansV' post='798455' date='16-Oct-2009 20:23']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?[/quote]

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

  4. #4
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='798455' date='16-Oct-2009 15:23']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?[/quote]
    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.

  5. #5
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='AndrewKKWalker' post='798457' date='16-Oct-2009 15:31']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.[/quote]

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

  6. #6
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='AndrewKKWalker' post='798457' date='16-Oct-2009 15:31']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.[/quote]

    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.

Posting Permissions

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