A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DSUM??



 
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2008, 06:33 PM posted to microsoft.public.access.gettingstarted
gd
external usenet poster
 
Posts: 209
Default DSUM??

I want to create a new field with a query, and sum the records in an existing
field, based on the criteria of another field.

In other words, let's say I have an Invoice# field and an InvAmt field. How
do I create a 3rd field in a query that totals all InvAmts for each instance
that a specific Invoice# appears in the Invoice# field?

Would it be a DSUM? Or just a SUM? I know that it's SUMIF as an Excel
formula, but I don't see that in Access. Is there an equivalent?

Thanks for your time!!
--
GD
  #2  
Old December 4th, 2008, 03:39 AM posted to microsoft.public.access.gettingstarted
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default DSUM??

Yes, use DSum domain function.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"GD" wrote in message
...
I want to create a new field with a query, and sum the records in an
existing
field, based on the criteria of another field.

In other words, let's say I have an Invoice# field and an InvAmt field.
How
do I create a 3rd field in a query that totals all InvAmts for each
instance
that a specific Invoice# appears in the Invoice# field?

Would it be a DSUM? Or just a SUM? I know that it's SUMIF as an Excel
formula, but I don't see that in Access. Is there an equivalent?

Thanks for your time!!
--
GD



  #3  
Old December 4th, 2008, 01:18 PM posted to microsoft.public.access.gettingstarted
gd
external usenet poster
 
Posts: 209
Default DSUM??

Thanks, Ken! Can you give me the exact expression? I've tried many
variations with no luck.
--
GD


"Ken Snell (MVP)" wrote:

Yes, use DSum domain function.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"GD" wrote in message
...
I want to create a new field with a query, and sum the records in an
existing
field, based on the criteria of another field.

In other words, let's say I have an Invoice# field and an InvAmt field.
How
do I create a 3rd field in a query that totals all InvAmts for each
instance
that a specific Invoice# appears in the Invoice# field?

Would it be a DSUM? Or just a SUM? I know that it's SUMIF as an Excel
formula, but I don't see that in Access. Is there an equivalent?

Thanks for your time!!
--
GD




  #4  
Old December 9th, 2008, 03:37 AM posted to microsoft.public.access.gettingstarted
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default DSUM??

Can you be specific about the data/fields? Your first post suggests that the
expression might be this:

=DSum("InvAmt", "NameOfTheTable", "[Invoice#]=" & [Invoice#])

The above assumes that you have a field or control named Invoice# on your
form and that that field/control contains the invoice number of interest,
and that that field/control is a numeric field.
--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"GD" wrote in message
...
Thanks, Ken! Can you give me the exact expression? I've tried many
variations with no luck.
--
GD


"Ken Snell (MVP)" wrote:

Yes, use DSum domain function.

--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"GD" wrote in message
...
I want to create a new field with a query, and sum the records in an
existing
field, based on the criteria of another field.

In other words, let's say I have an Invoice# field and an InvAmt field.
How
do I create a 3rd field in a query that totals all InvAmts for each
instance
that a specific Invoice# appears in the Invoice# field?

Would it be a DSUM? Or just a SUM? I know that it's SUMIF as an Excel
formula, but I don't see that in Access. Is there an equivalent?

Thanks for your time!!
--
GD






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.