473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DSUM advice

What I really need is a SUMIF, but it looks like a DSUM may be able to help... I want to sum invoice amounts from an invoice table when the id from the original table = the id from the invoice table.

Below is a picture of what I'm trying to do:

http://www.imagehoop.com/view_image/19db81144/untitled.JPG

The DSUM formula I've tried looks like this:

Total Invoice Amount: DSum("[Invoice Amount]","[tbl Invoice]","[tbl Invoice]![DB ID] =[DB ID]")

This gives me the sum of all of the invoices for every line, not when the DB ID from the "tbl Invoice" table equals the DB ID from the budget table

Anyone have advice on how to make the criteria match on the id's?

Thank you!
Apr 24 '07 #1
2 1475
dima69
181 Expert 100+
What I really need is a SUMIF, but it looks like a DSUM may be able to help... I want to sum invoice amounts from an invoice table when the id from the original table = the id from the invoice table.

Below is a picture of what I'm trying to do:

http://www.imagehoop.com/view_image/19db81144/untitled.JPG

The DSUM formula I've tried looks like this:

Total Invoice Amount: DSum("[Invoice Amount]","[tbl Invoice]","[tbl Invoice]![DB ID] =[DB ID]")

This gives me the sum of all of the invoices for every line, not when the DB ID from the "tbl Invoice" table equals the DB ID from the budget table

Anyone have advice on how to make the criteria match on the id's?

Thank you!
Not quite sure what you need to do. I guess you want to put that sum into calculated field on the form, am I right ?
Anyway, the criteria you put there "[tbl Invoice]![DB ID] =[DB ID]" cannot work because both [tbl Invoice]![DB ID] and [DB ID] at this context refer to [tbl Invoice], i.e. the equasion is always true.
I think that what you need here is something like "[DB ID] = " & Me![DB ID]
Apr 24 '07 #2
I just figured it out, my formula looks like this:

DSum("[Invoice Amount]","[tbl Invoice]","[tbl Invoice]![DB ID] =" & [DB ID] & "")

Thank you for your help.
Apr 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Rolan | last post by:
I'm using Access 97 and need some assistance in sorting out a proper DSum expression, or maybe even DCount might be an alternative. I have tried numerous combinations, but with no apparent success....
2
by: Dalan | last post by:
I seemed to be having problems with structuring the use of NZ with a DSum expression. Having tried numerous variations of the expression without success, I'm asking for assistance. First some...
1
by: Alex | last post by:
Acc 97 Hi, I have the following in my query which works well if it is all set to numbers on table design. But what I want to do is where it states MC (short for machine name) use the actual...
3
by: Mark Reed | last post by:
All, I have never used this function before and am not sure it what I need. Just to clarify, I have a report based on a query which has amoungst other field, wk, parea & packs_req. What I am...
1
by: gbb0330 | last post by:
Hi All i am trying to calculate Quantity on hand in a unbound textbox in a form with a subform QonHand=Qreceived - TotalQSold TotalQsold=QsoldOnEbay+QsoldThruOtherChannels here is my...
6
by: Mike | last post by:
Dim vDateE As String vDateE = #7/12/2005# The following works to find Cost in TblExpenses for 7/12/2005: MsgBox (DSum("Cost", "TblExpenses", "DateofPurchase = #7/12/2005#")) However I...
1
by: kaosyeti | last post by:
so i'm new to access but i've done a lot in the last 3 months since i looked at it for the first time back then. so when i finished my first db for my job, i cut it close to the end of the year...
3
by: technocraze | last post by:
Hi community experts, I am having an isue with Dsum function that is used to count the total number for a particular field (intake) at the textbox afterupdate event with condition/ criteria...
33
by: potassium flower | last post by:
I am trying to create a food order system for a restaurant. I have tried using both the DSum and Sum functions to calculate the total cost of an order. The total cost is a textbox on the form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.