From: Alan on
Please can someone tell me what wrong with my dsum


=dsum("[Amount]", "Sales Analysis", "SalesgroupingField = "Customer No" & "
CbMonth" = Month" & " "Type = "Actual")
From: Douglas J. Steele on
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" <Alan(a)discussions.microsoft.com> wrote in message
news:1868F1AA-7E8C-4B45-98E5-758A41A36ED0(a)microsoft.com...
> Please can someone tell me what wrong with my dsum
>
>
> =dsum("[Amount]", "Sales Analysis", "SalesgroupingField = "Customer No" &
> "
> CbMonth" = Month" & " "Type = "Actual")


From: Al Campagna on
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" <Alan(a)discussions.microsoft.com> wrote in message
news:1868F1AA-7E8C-4B45-98E5-758A41A36ED0(a)microsoft.com...
> Please can someone tell me what wrong with my dsum
>
>
> =dsum("[Amount]", "Sales Analysis", "SalesgroupingField = "Customer No" &
> "
> CbMonth" = Month" & " "Type = "Actual")