Thread: dsum problem
View Single Post
  #4  
Old May 20th, 2010, 03:29 PM posted to microsoft.public.access
Alan
external usenet poster
 
Posts: 459
Default dsum problem

cbmonth is a combo box with is bound to table sales analysis "posting Date
Period", the format is 2010/07 not sure if its text or date??

i put in the ME. function and i get #?Name error, if i leave it out i get a
value but wrong total

"Daryl S" wrote:

Alan -

Any field names, table names, etc. with spaces or special characters need to
be surrounded by square brackets:

Also, what is [cbmonth]? Is it a control on a form? If so, it should be
either Me.[cbmonth] (if the code is on the form), or
Forms![YourFormName]![cbmonth] (if referred to outside the form).

=DSum("[AmountActual]","[Sales Analysis]","[Posting Date Period] = '" &
[cbmonth] & "'" And "[Revenue stream divsion] = 'Production'" And "[Type] =
'Actual'")

If you still have issues, tell us what [cbmonth] is so we can help with the
syntax...

--
Daryl S


"Alan" wrote:

Can someone tell me what wrong with my dsem as the cbmonth is not working

=DSum("[AmountActual]","Sales Analysis","[Posting Date Period] = '" &
[cbmonth] & "'" And "Revenue stream divsion = 'Production'" And "Type =
'Actual'")