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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sintax to DSUM (?)



 
 
Thread Tools Display Modes
  #1  
Old November 26th, 2004, 06:54 PM
an
external usenet poster
 
Posts: n/a
Default Sintax to DSUM (?)

I would like to know sintaxe to =DSUM...

To Sum in Main Form Textbox, all numeric values of fields
with same Id.

(Bad sample):

=DSum([EndKm]-[StartKm] Where [IdX]=[Forms]![F_MainForm]!
[IdX])

Thanks in advance.
an

  #2  
Old November 26th, 2004, 07:11 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default

The syntax is in the help file.

DSum(expr, domain, [criteria])

Using what you have:
=DSum("[EndKM]-[StartKm]", "TableOrQueryName", "[IdX]=" &
[Forms]![F_MainForm]![IdX])

This assumes that IdX is numeric, if it isn't, you'll have to concatenate in
quotes as well.
=DSum("[EndKM]-[StartKm]", "TableOrQueryName", "[IdX]=""" &
[Forms]![F_MainForm]![IdX] & """")

--
Wayne Morgan
MS Access MVP


"an" wrote in message
...
I would like to know sintaxe to =DSUM...

To Sum in Main Form Textbox, all numeric values of fields
with same Id.

(Bad sample):

=DSum([EndKm]-[StartKm] Where [IdX]=[Forms]![F_MainForm]!
[IdX])

Thanks in advance.
an



  #3  
Old November 26th, 2004, 07:20 PM
an
external usenet poster
 
Posts: n/a
Default

Ok, WM

Many thanks for your help.
Is exactly what I would like.
Have you a good weekend.
an


-----Original Message-----
The syntax is in the help file.

DSum(expr, domain, [criteria])

Using what you have:
=DSum("[EndKM]-[StartKm]", "TableOrQueryName", "[IdX]=" &
[Forms]![F_MainForm]![IdX])

This assumes that IdX is numeric, if it isn't, you'll

have to concatenate in
quotes as well.
=DSum("[EndKM]-[StartKm]", "TableOrQueryName", "[IdX]="""

&
[Forms]![F_MainForm]![IdX] & """")

--
Wayne Morgan
MS Access MVP


"an" wrote in

message
...
I would like to know sintaxe to =DSUM...

To Sum in Main Form Textbox, all numeric values of

fields
with same Id.

(Bad sample):

=DSum([EndKm]-[StartKm] Where [IdX]=[Forms]!

[F_MainForm]!
[IdX])

Thanks in advance.
an



.

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
dsum and update (requery) beppe005 Using Forms 3 August 25th, 2004 09:08 PM
DSUM search issues needyourhelp General Discussion 1 July 2nd, 2004 09:17 PM
DSUM Criteria and Excel Help Earl Kiosterud Worksheet Functions 2 April 30th, 2004 07:55 PM


All times are GMT +1. The time now is 05:51 AM.


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