A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

dsum on report getting #error



 
 
Thread Tools Display Modes
  #1  
Old March 30th, 2010, 05:02 PM posted to microsoft.public.access.reports
Alan
external usenet poster
 
Posts: 459
Default dsum on report getting #error

=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??
  #2  
Old March 30th, 2010, 07:13 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default dsum on report getting #error

Alan wrote:

=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.
--
Marsh
MVP [MS Access]
  #3  
Old March 31st, 2010, 02:33 AM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default dsum on report getting #error

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" wrote in message
news
Alan wrote:

=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.
--
Marsh
MVP [MS Access]


  #4  
Old March 31st, 2010, 04:49 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default dsum on report getting #error

Duane Hookom wrote:

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



Well, Duane, you raise a very good point. I think I may
have been in too big a hurry to answer the question that was
asked and skipped right on by the real situation.

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.