We help IT Professionals succeed at work.

Still another DSum syntax question

SteveL13
SteveL13 asked
on
289 Views
Last Modified: 2012-05-11
Here is what I have right now...

Me.txtBooked = DSum("[QuotedSales]", "OpenJob", "[ProductCode] <> 350 and [BookedDate] between " & "#" & Forms!frmSelectDateRange!txtStart & "#" & " And " & "#" & Forms!frmSelectDateRange!txtStart + 14 & "#" & "")

Please note the "+ 14".   I want this to sum the values of QuotedSales from the field txtStart through txtStart plus 14 days.  What I have above is not working.

--Steve
Comment
Watch Question

Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Top Expert 2016

Commented:
try this

 Me.txtBooked = DSum("[QuotedSales]", "OpenJob", "[ProductCode] <> 350 and [BookedDate] between #" & Forms!frmSelectDateRange!txtStart & "# And #" & DateAdd("d", 14, Forms!frmSelectDateRange!txtEnd) & "#")
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.