• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Still another DSum syntax question

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
0
SteveL13
Asked:
SteveL13
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Me.txtBooked = DSum("[QuotedSales]", "OpenJob", "[ProductCode] <> 350 and [BookedDate] between " & "#" & Forms!frmSelectDateRange!txtStart & "#" & " And " & "#" & Forms!frmSelectDateRange!txtStart & "# + 14 " & "")
0
 
Rey Obrero (Capricorn1)Commented:
try this

 Me.txtBooked = DSum("[QuotedSales]", "OpenJob", "[ProductCode] <> 350 and [BookedDate] between #" & Forms!frmSelectDateRange!txtStart & "# And #" & DateAdd("d", 14, Forms!frmSelectDateRange!txtEnd) & "#")
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now