Dsum help

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
pdvsaProject financeAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
PatHartmanConnect With a Mentor Commented:
Yes.  Create a querydef and then reference it from both places.
0
 
PatHartmanConnect With a Mentor Commented:
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
 
JimFiveCommented:
You need to DSUM on the query that contains the calculation not the table.
0
 
pdvsaProject financeAuthor Commented:
OK.  I guess I need to make a saved query because the query only resides on the record source of form?
0
 
pdvsaProject financeAuthor Commented:
thank you....will be asking a similar question in just a minute.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.