Solved

Dsum help

Posted on 2013-12-04
5
298 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 35

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 35

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

776 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