dsum syntax

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

Please can someone tell me what wrong with my dsum


=dsum("[Amount]", "Sales Analysis", "SalesgroupingField = "Customer No" & "
CbMonth" = Month" & " "Type = "Actual")
 
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.
 
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."
 
Back
Top