Clean Month & Year to Date Qry

Hi again, I don't know what's happened - I simply changed the name of the account number column in the table to "Account" and altered the appropriate name in the formula and it's worked!

Thanks to everyone for your great help!!
 
Right, in your example above, it's the result of having "account number" not wrapped in brackets (space between account and number), if I do the same here I get the same error message (RunTime error 3075)

Code:
YTDBud: DSum("[2012 Bud]","Table","Period <=" & [Period] & " AND [b][[/b]Account Number[b]][/b] = 6850")

this is why spaces in column names are the work of satan himself. :D
 
And tehNellie clearly wrote it properly in his post #17 which you didn't pick up on.
 
Code:
debug.print DSum("[2012 Bud]","Table","Period <=" & [Period] & " AND [COLOR=Red][[/COLOR]Account Number[COLOR=Red]][/COLOR] = " & [COLOR=Blue][[/COLOR]Account Number[COLOR=Blue]][/COLOR])
You had the blue ones but missed the red ones. Ah well! :)
 
While you are at it search Naming Conventions. e.g. Spaces are not normally recommended.

See post #18

Also did I misread the question. Does the OP want the Periods grouped.
 
vbaInet

I was addressing anyone who bothered to read.

It appears that no one read my post about naming conventions especially spaces.

I also feel that the solution is a bit more involved.

But that is for the OP to decide.

Perhaps I am wrong. It wouldn't be the first time either.
 

Users who are viewing this thread

Back
Top Bottom