Solved

Dsum help

Posted on 2013-12-04
5
290 Views
Last Modified: 2013-12-05
Experts,

I have the following Dsum in a subform:

=DSum("[USDEquiv]","tblFXRates","[ProjID]=" & Nz([ProjID],0))

Wouldnt this Sum all USDEquiv for ProjID = ProjID?

USDEquiv is a calculated field (see pic).  the Dsum is not summing and only thing I can think of is USDEquiv is a calcualted field and not a field in tblFXRates.   The ProjID's are populated.

here is the calcualted field as shown in the pic:
USDEquiv: IIf([CurrencyID]=1,[tblFXRates].[Amount],([tblFXRates].[Amount]*[ExchangeRate]))

thank you.

tblFXrates,query
0
Comment
Question by:pdvsa
  • 2
  • 2
5 Comments
 
LVL 34

Assisted Solution

by:PatHartman
PatHartman earned 500 total points
ID: 39696857
The picture is a little blurry but the field you are referencing is not in tblFXRates.  Change the DSum() to reference the query you show in the picture.  For most purposes, tables and select queries are interchangeable.
0
 
LVL 15

Expert Comment

by:JimFive
ID: 39696859
You need to DSUM on the query that contains the calculation not the table.
0
 

Author Comment

by:pdvsa
ID: 39697033
OK.  I guess I need to make a saved query because the query only resides on the record source of form?
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39697321
Yes.  Create a querydef and then reference it from both places.
0
 

Author Closing Comment

by:pdvsa
ID: 39698287
thank you....will be asking a similar question in just a minute.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
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…

746 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

9 Experts available now in Live!

Get 1:1 Help Now