G
Guest
Need help with formatting the DSUM date criteria. The following code is in
the Report Footer.
Set rs = CurrentDb.OpenRecordset("Select * From [TestCreditDebits]",
dbOpenDynaset)
' Is not pulling the date that is typed into the Form's SalesDate field.
' Seems to get some arbitrary date
' If I replace [SalesDate] with a constant date, it works fine
With rs
TotalSum = DSum
With rs
TotalSum = DSum("Credit", "TestCreditDebits", "[Sales Date] < #" &
[SalesDate] & "# ")
End With
the Report Footer.
Set rs = CurrentDb.OpenRecordset("Select * From [TestCreditDebits]",
dbOpenDynaset)
' Is not pulling the date that is typed into the Form's SalesDate field.
' Seems to get some arbitrary date
' If I replace [SalesDate] with a constant date, it works fine
With rs
TotalSum = DSum
With rs
TotalSum = DSum("Credit", "TestCreditDebits", "[Sales Date] < #" &
[SalesDate] & "# ")
End With