W
Wahab
Please help me to take out records between 2 given dates
which is BeginningDate and EndingDate on form. I'm
writing SQL as follows :
Dim strSQL As String
strSQL = "SELECT * FROM Invoices WHERE [Date] Between
#" & [BeginningDate] & " # AND # " & [EndingDate] & "#"
Set db = CurrentDb
Set rst = db.OpenRecordset(strSQL)
With rst
Do Until rst.EOF
.Edit
rst![InvPosted] = 1
.Update
.MoveNext
Loop
End With
rst.Close
Set db = Nothing
End Sub
This is not selecting correct dates. Please help me.
which is BeginningDate and EndingDate on form. I'm
writing SQL as follows :
Dim strSQL As String
strSQL = "SELECT * FROM Invoices WHERE [Date] Between
#" & [BeginningDate] & " # AND # " & [EndingDate] & "#"
Set db = CurrentDb
Set rst = db.OpenRecordset(strSQL)
With rst
Do Until rst.EOF
.Edit
rst![InvPosted] = 1
.Update
.MoveNext
Loop
End With
rst.Close
Set db = Nothing
End Sub
This is not selecting correct dates. Please help me.