Solved

# Access 2003:  Report - Group Totals

Posted on 2011-03-23
365 Views
Hi EE,

Would like to group total, the number of credits appearing on each detail line....

However, in the detail processing, am setting the credits field on the report to an alpha literal
if it's value is 0.

So am concerned what the group total will total, the underlying field, or the literal.

So should i code for the group total credits something like this:

=Sum(IIf(IsNumeric([[Credits Earned]),[Credits Earned],0)

0
Question by:mytfein
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2
• 2

LVL 21

Accepted Solution

Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 334 total points
ID: 35205167

In Access 2003 you should be able to  use:

=Sum(IIf(IsNumeric([[Credits Earned]),[Credits Earned],0)

To convert a literal string to a numeric value use the Val() function.

Depending on your data you might be able to use this:

=Sum(Val([Credits Earned]))

0

LVL 15

Assisted Solution

Simon Ball earned 166 total points
ID: 35205315
i think you will be performing the sum on the underlying data set for the report, and not the control on which you have performed the switch to alpha?

0

LVL 21

Assisted Solution

Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 334 total points
ID: 35205499
Try:

=Sum(IIf(IsNumeric([[Credits Earned]),Val([Credits Earned]),0)
0

Author Comment

ID: 35208418
Tx guys for writing,

truthfully, i got this idea from another EE post....

i don't understand how the Access grouping mechanism knows to do this SUM statement
with an implicit GROUP BY

Also, normally i like writing SQL bec. if feel more control but what the diff bet:
=SUM   and   =DSUM  (btw, i notice that DSUM does have a where parameter)

0

Author Comment

ID: 35208831
Hi Guys,

thank you HiTech for teaching about the val function. Did not know about it, and it's great bec. it
works with data type double which i needed.

so i'm trying HiTech's statement of:

=Sum(IIf(IsNumeric([[Credits Earned]),Val([Credits Earned]),0)

in a control in the group footer, and when i click ok, the control source of the control does not update
to the above formula....

if you have a minute, below is the mdb, can u try iupdateing the footer control pls?

tx, s
2011-03-25-EE-sum-.zip
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
###### Suggested Courses
Course of the Month2 days, 18 hours left to enroll