ERROR# DSUM

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

Alan

=DSum("[Amount]"-"[Amount2]","Tabel1"," [CustomerNo] = " & [CustomerNo])


Have this on my report

my report fives me this

CustomerNo Amount Amount2 result

C00001 1000 1000 #error
C00002 1000 2000 #error

Please can some tell me why i'm getting error??
 
Alan said:
=DSum("[Amount]"-"[Amount2]","Tabel1"," [CustomerNo] = " & [CustomerNo])


Have this on my report

my report fives me this

CustomerNo Amount Amount2 result

C00001 1000 1000 #error
C00002 1000 2000 #error

Please can some tell me why i'm getting error??


The expression you're summing must be provided to DSum as a single string
argument. Try this:

=DSum("[Amount]-[Amount2]","Tabel1"," [CustomerNo] = " & [CustomerNo])

It isn't clear to me, though, whether that expression will really give you
what you want, or whether it could be replaced by something simpler. Is
each of your example report lines a single record from the report's
recordsource? If so, maybe all you need for the controlsource of your
[result] text box is:

=[Amount1]-[Amount2]
 
Back
Top