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
|
|||
|
|||
dsum syntax
Please can someone tell me what wrong with my dsum
=dsum("[Amount]", "Sales Analysis", "SalesgroupingField = "Customer No" & " CbMonth" = Month" & " "Type = "Actual") |
#2
|
|||
|
|||
dsum syntax
Assuming CustomerNo and Month are both numeric variables, it should be
=dsum("[Amount]", "Sales Analysis", "SalesgroupingField = " & _ Customer No & " AND CbMonth = " & Month & "AND Type = 'Actual'") And, actually, Month is a bad choice for a variable, since it's a reserved word. Note the single quotes around Actual. -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "Alan" wrote in message ... Please can someone tell me what wrong with my dsum =dsum("[Amount]", "Sales Analysis", "SalesgroupingField = "Customer No" & " CbMonth" = Month" & " "Type = "Actual") |
#3
|
|||
|
|||
dsum syntax
Alan,
Because the syntax you've given is "off" by quite a bit, it's hard toll what elements of the DSum are field names or field values... and what field types might be involved. We can give you a better answer if you describe each of the elements in the DSum, as to whether they are field names, or a possible field values. If a field name, please indicate the type (Text? Numeric?) example.. We know [Amount] is a field name and probably numeric type, and we're assuming "Sales Analysis" is a table... Please continue describing all the elements. It will affect the final syntax. -- hth Al Campagna Microsoft Access MVP 2007-2009 http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "Alan" wrote in message ... Please can someone tell me what wrong with my dsum =dsum("[Amount]", "Sales Analysis", "SalesgroupingField = "Customer No" & " CbMonth" = Month" & " "Type = "Actual") |
Thread Tools | |
Display Modes | |
|
|