#Error in Dsum query

lawtonl

Registered User.
Local time
Yesterday, 18:20
Joined
Nov 3, 2009
Messages
28
I have a query where I want to sum a running total. I've used the microsoft example as it's exactly how I want the query to be shown. I thought I had the correct syntax but I keep getting #error when the query has been ran.

Here's the syntax:

Code:
Totals: DSum("CountOfExternal Reference","testexch","DatePart('m',[Contract Start Date])<=" & [AMonth] & " And  DatePart('yyyy', [Contract Start Date])<=" & [AYear] & "")

CountOfExternal Reference is a count value from the query testexch and I'm not sure if that might have something to do with it.

tia
 
Totals: DSum("[CountOfExternal Reference]","testexch","DatePart

Try an use brackets marked in red, Access hates spaces in field/table refrences.

JR
 
Thanks.

I did try that and Access just seems to grind to a halt and then crash. I'll try and remove the space in the field name and see how I get on with that.

Any other suggestions?
 

Users who are viewing this thread

Back
Top Bottom