thirtydash9
Technical User
Can anyone help with this DSum Syntax? I have been at it for hours.
If I take off the 'AND' part it works fine. I'm pretty sure the problem is with the 2nd condition.
Me.txtCpesNeeded = DSum "[creditsReceived]", "subqryCpeLetter", "[sortNum] = Me.txtSortNum AND [appliedOn]>=#" & Me.txtNextAnnivMinusOne & "#")
I have tried every possible variation I can think of, including pasting in the syntax directly from the Help file and replacing with my object names. I have checked that all of the object names are correct and do exist in the related query and report.
When I try to run this I get run-time error 2001 (you canceled the previous operation).
p.s. me.txtNextAnnivMinusOne is an unbound text box based on the local variable dteNextAnnivMinusOne. If there is a way to call a local variable within DSum I would love to know.
Thank you to whoever can help!
fiddlr
If I take off the 'AND' part it works fine. I'm pretty sure the problem is with the 2nd condition.
Me.txtCpesNeeded = DSum "[creditsReceived]", "subqryCpeLetter", "[sortNum] = Me.txtSortNum AND [appliedOn]>=#" & Me.txtNextAnnivMinusOne & "#")
I have tried every possible variation I can think of, including pasting in the syntax directly from the Help file and replacing with my object names. I have checked that all of the object names are correct and do exist in the related query and report.
When I try to run this I get run-time error 2001 (you canceled the previous operation).
p.s. me.txtNextAnnivMinusOne is an unbound text box based on the local variable dteNextAnnivMinusOne. If there is a way to call a local variable within DSum I would love to know.
Thank you to whoever can help!
fiddlr