Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2005

Tip: Looking for answers? Try searching our database.

Sum Expression using WHERE clause??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jaded in Cali - 25 Oct 2005 23:43 GMT
I am trying to place two sums in the header of a report.  One sums the values
in a CREDITS field when the SUM_CODE field equals "K" and the other when the
SUM_CODE field equals "B".  

I remember creating expressions several years ago that used a WHERE clause
to select only certain data to sum, count, or whatever.  Is there a reference
to this syntax?  As I remember, it was very tempermental.  When the Control
Source property window accepts the expression I create, I still get a "#Name"
error in the report.
Ofer - 26 Oct 2005 00:09 GMT
Try this
=Sum(IIf([SUM_CODE]="K", [CREDITS],0))

=Sum(IIf([SUM_CODE]="B", [CREDITS],0))
Signature

If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

> I am trying to place two sums in the header of a report.  One sums the values
> in a CREDITS field when the SUM_CODE field equals "K" and the other when the
[quoted text clipped - 5 lines]
> Source property window accepts the expression I create, I still get a "#Name"
> error in the report.
Jaded in Cali - 26 Oct 2005 15:58 GMT
Ofer

You rock!!! Thank you.

--j
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.