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 / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

summing expression

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnE - 24 Jul 2007 16:58 GMT
I have a subform that in the footer has a txtbox that sums up a field.  This
works fine.  But I need to have another txtbox in the footer sum up the same
field but only if it is billable.  The subform does have a checkbox on it to
indicate billable or not.  I am stumped in how to create the expression for
this and seek help from the group.  Here is the current sum expression.
=Sum([WorkTimeAmount])
How do I go about limiting the summing to only billable?
Thanks in advance for the help.
... John
Marshall Barton - 24 Jul 2007 17:19 GMT
>I have a subform that in the footer has a txtbox that sums up a field.  This
>works fine.  But I need to have another txtbox in the footer sum up the same
[quoted text clipped - 3 lines]
>=Sum([WorkTimeAmount])
>How do I go about limiting the summing to only billable?

=Sum(IIf([billable field], [amount field], 0))

Signature

Marsh
MVP [MS Access]

Dale Fye - 24 Jul 2007 17:20 GMT
Assuming your billable fieldname is "Billable", try something like:

=Sum(Abs([Billable]) * [WorkTimeAmount])

HTH
Dale
Signature

Email address is not valid.
Please reply to newsgroup only.

> I have a subform that in the footer has a txtbox that sums up a field.  This
> works fine.  But I need to have another txtbox in the footer sum up the same
[quoted text clipped - 5 lines]
> Thanks in advance for the help.
> ... John
JohnE - 24 Jul 2007 17:36 GMT
Thanks to you both as both examples worked.  
>>> John

> I have a subform that in the footer has a txtbox that sums up a field.  This
> works fine.  But I need to have another txtbox in the footer sum up the same
[quoted text clipped - 5 lines]
> Thanks in advance for the help.
> ... John
 
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.