Solved

Access 2003:  Report - Group Totals

Posted on 2011-03-23
5
320 Views
Last Modified: 2012-05-11
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)

Pls advise, tx, sandra
0
Comment
Question by:mytfein
  • 2
  • 2
5 Comments
 
LVL 21

Accepted Solution

by:
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

by:Simon Ball
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?

so your sum should work.
0
 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
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

by:mytfein
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)

pls advise, tx, s
0
 

Author Comment

by:mytfein
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now