Results 1 to 4 of 4
  1. #1
    newbie is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    34

    Sum Function Help

    I have a report where I need to sum in the report footer. I need to sum a text value so what I have done is created an invisible field in the client header with:



    Control source: =IIf([ControlName]="X",1,0)
    Name: Count1

    Then in the footer, I am trying to place a sum function with a control source of =Sum([Count1]). When I view my report though, I get an enter parameter value dialog box asking for Count1. What am I doing wrong on my sum?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Why did you put the invisible control in the Header section rather than the Detail section of the report?

  3. #3
    newbie is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2009
    Posts
    34
    I put it in the header because that is where the field is grouped. When I put it in the detail section it counts ALL repeated records.

    I tinkered around and have figured it out. I changed the property 'running sum' on the text box in my header to 'over group'. Then in my report footer I created a text box and gave it a control source of =CLng([Count1]). Worked like a charm. I have all sorts of calculations now.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! I love it when posters figure out their own solution.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Want function to get current function name
    By Davis DeBard in forum Programming
    Replies: 2
    Last Post: 08-13-2009, 05:02 AM
  2. function key
    By marianne in forum Access
    Replies: 5
    Last Post: 05-14-2009, 01:26 AM
  3. Aging A/P function
    By nim73 in forum Programming
    Replies: 0
    Last Post: 05-07-2009, 01:23 PM
  4. Avg Function
    By hiker8117 in forum Access
    Replies: 3
    Last Post: 04-23-2009, 11:14 PM
  5. Is there a function to do this....
    By Nowherefast in forum Access
    Replies: 2
    Last Post: 12-31-2008, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums