Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214

    Totalling

    I have attached a screenshot of the report I am trying to create. My problem occurs when I try and create subtotals and totals for the AG and RA columns. These AG and RA columns are formatted as Yes/No columns in their respective table. I have $ values listed for each states AG and RA in another table. I have the report set up to insert the $ value instead of the check mark created by the Yes/No format. I can not get these to total at all. All it does is count the records of AG and RA instead of totalling the $ values.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try

    =Sum(Your IIf function here)

    but use 0 instead of "" for the false argument.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    Thank you. That worked.

  4. #4
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    I came across another problem. I can't seem to get the Grand Total working. I was able to get each column AG and RA to total in each group and then was able to create a single total (Rep Total) from the group subtotals. You will see, in the screenshot, that the Rep Total =[Text75]+[Text76] these both are the subtotals from each group. I want to have a Grand Total at the end of the report aggregating the Rep Totals. Any ideas?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Typically it would be done the same way as the group footer. If you don't want the two extra text boxes, you can either hide them or in your total text box:

    =sum(IIf 1) + sum(IIf 2)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    I want to keep the subtotals under AG and RA for each Rep and also have the Rep Total. How do I create a grand total at the end of the report totaling the Rep Totals?

  7. #7
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    Sorry, misunderstood what you were saying. I got it to work. Thanks.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, glad you got it sorted out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    Sorry about reopening this thread (I promise this is the last time). But now I have run into a problem where I have the column [Firm AG Fee] that I don't want to show on my report except for down in the Report Footer as a subtotal. In the table, there is a fee for each state registered as AG in. In my report, it is summing each state for each rep. I just want it to sum the column from the table not for each rep as shown in the report. Any ideas?

    Thanks.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'm not clear on the problem. A control source of

    =Sum([Firm AG Fee])

    should total the amounts, regardless of state.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    It says there is a Control Source problem (see attached). Also attached is a clip of the table.

    An example of what it is doing is

    Group Rep1
    State
    NJ 50
    PA 10
    Group Rep2
    State
    NJ 50
    VA 15

    The total should be 75 but it is returning 125 because it is summing NJ as many times as it appears in each group.

    I hope this helps.

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The circular reference is probably because the textbox has the same name as the field. If you're saying the data is repeated in the report's source query for some reason, you may have to use a DSum() to sum the data directly from the table, or use a subreport.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    The circular reference is fixed. Attached shows the Dsum function. Is it set up right? It is returning a #error when going to report view.

  14. #14
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No, it's not. This should help:

    DLookup Usage Samples

    You may also need to bracket the field name due to the inadvisable spaces.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  15. #15
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    214
    I entered this:
    =DSum([Firm AG Fee],"States","ID= ID") and it returns a number that is closer to the actual amount but don't know why it is still off. Is this still set up wrong?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Totalling Time Values
    By l3111 in forum Access
    Replies: 2
    Last Post: 07-16-2011, 08:05 PM
  2. Replies: 5
    Last Post: 06-07-2010, 12:20 PM

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