?
Solved

Dsum help

Posted on 2013-12-04
5
Medium Priority
?
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 38

Assisted Solution

by:PatHartman
PatHartman earned 2000 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 38

Accepted Solution

by:
PatHartman earned 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

770 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