DSUM syntax problem

Ben2k

Board Regular
Joined
Oct 16, 2002
Messages
77
I have this in a textbox

=DSum(Qry_AllFinanceDeals1![Finance Amt],[Qry_AllFinanceDeals1],Qry_AllFinanceDeals1!Company='haydock finance ltd')

When run it just displays #Name?

How can I find out whats wrong?

Ben
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try :-

=DSum("[Finance Amt]","[Qry_AllFinanceDeals1]","[Company] = 'haydock finance ltd'")


HTH

Peter
 
Upvote 0
Thanks Peter,

It now displays #Error

How can I debug it and find out what the error is?

Ben
 
Upvote 0
Did you copy my line or retype it? there is a single ' at the end which is not obvious and missing it could give this error

=DSum("[Finance Amt]","[Qry_AllFinanceDeals1]","[Company] = 'haydock finance ltd ' " ) -- Spaced out for clarity.

The other thing that would give this error would be a mis-spelling of any of the field/table names

HTH

Peter
 
Upvote 0
I copied and pasted your line.

The Qry_AllFinanceDeals1 is a query not a table, will that be okay?

Ben
 
Upvote 0
It should work with a query just the same as a table, all I can suggest is double checking spelling, if you are using a totals query the query can rename fields.

as a test you could try running it with out the criteria
=DSum("[Finance Amt]","[Qry_AllFinanceDeals1]")


Peter
 
Upvote 0

Forum statistics

Threads
1,221,798
Messages
6,162,027
Members
451,737
Latest member
MRASHLEY

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top