View Single Post
  #3  
Old May 28th, 2010, 11:08 PM posted to microsoft.public.access
Bob Quintal
external usenet poster
 
Posts: 939
Default can someone tell me where my formula going wrong V2

=?Utf-8?B?QWxhbg==?= wrote in
:

=DSum("[Amount6a6fs]","[Sales Analysis]","[Posting Date Period] =
'" & [cbMonth] & "' And [Revenue Stream Division] = 'Production'
or [Revenue Stream Division] = 'other' And ([Customer No] =
'C01317')")

every works apart from the last par customer no, the table name is
correct spelling,
the sun i'm getting is for everything not that specifc customer.



Parentheses are messed up. You have unnecessary ones around the
([Customer No] = 'C01317') but more importantly are missing a pair
around your two [Revenue Stream Division] = parameters.

Try
=DSum(
"[Amount6a6fs]",
"[Sales Analysis]",
"[Posting Date Period] = '" & [cbMonth] & "'
And
(
[Revenue Stream Division] = 'Production'
or [Revenue Stream Division] = 'other'
)
And [Customer No] = 'C01317'"
)

(all on 1 line, i've split it to show the grouping)