dsum on report getting #error

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??
 
D

Duane Hookom

I'm not sure why DSum() is used when it looks like a simple control source
of
=Amount-Amount2
should work the same.


--
Duane Hookom
MS Access MVP

Marshall Barton said:
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


You have the quotes around the names instead of around the
expression. Try it this way:

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

All those [ ] were unnecessary so I removed them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top