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 / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

Report Calculation Trouble

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DCH - 12 Jul 2007 01:54 GMT
Can anyone help me with this expression?

I have a report linked to a query with the following fields bieng pulled
from various tables:

[NRP]        Currency: Non Recurring Price
[#]        Number: Quantity
[TDAPP]                   Yes (0)/No(-1): Term Discount Applicable

In the report I have created the following calculated fields:

[TotalNRP] = [NRP]* [#]
[TDNRP] =IIf([TDAPP]="-1",[NRP]*[#],"0")

Both of which perform well.  My problem is I need to total the TDNRP column
of the report.
I tried creating a new field called [TotalTDNRP] =sum
(IIf([TDAPP]="-1",[NRP]*[#],"0")) and it didn’t work.

Any help would be greatly appreciated.

Many thanks, David.
Ofer Cohen - 12 Jul 2007 06:52 GMT
What do you get? Error or wrong resault?
Does this formula works when not trying to sum on it?

Any way, check the followings:
1. Yes/No fields and numbers don't need double quotes, try:
sum(IIf([TDAPP]=True,[NRP]*[#],0))

2. Check for Nulls
sum(IIf([TDAPP]=True,Nz([NRP],0)*Nz([#],0),0))

3. Make sure the text box where this formula located in doesnt have the
name: TDAPP, NRP, [#]

4. The Sum need to be on the Report Footer and not the PageFooter, it won't
work on the page footer

Signature

Good Luck
BS"D

> Can anyone help me with this expression?
>
[quoted text clipped - 18 lines]
>
> Many thanks, David.
 
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.