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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |