J
JIMMIE WHITAKER
How would I get the following where clause to work? If I take out the last
part it works, it does the >= part. But I can't get it to work with the <=
part. This is in code, not query window. Also it's wrapped here, in code
the where clause is on one line only. Any help is appreciated.
Sub UPDT_FUEL()
Dim dbs As Database
Dim STRSQL2 As String, QUT As String
Dim T2, T4
T2 = Text2
T4 = Text4
Set dbs = CurrentDb
QUT = Chr$(34)
STRSQL2 = "UPDATE DISPATCH" _
& " SET DISPATCH.FL_SC = " & QUT & Me![Text10] & QUT _
& " WHERE DISPATCH.FL_SC Is Null AND DISPATCH.BILL_TO = 'C1057' AND
DISPATCH.LOAD_DATE >= " & T2 & " AND DISPATCH.LOAD_DATE <= " & T4
dbs.Execute STRSQL2
dbs.Close
Set dbs = Nothing
End Sub
part it works, it does the >= part. But I can't get it to work with the <=
part. This is in code, not query window. Also it's wrapped here, in code
the where clause is on one line only. Any help is appreciated.
Sub UPDT_FUEL()
Dim dbs As Database
Dim STRSQL2 As String, QUT As String
Dim T2, T4
T2 = Text2
T4 = Text4
Set dbs = CurrentDb
QUT = Chr$(34)
STRSQL2 = "UPDATE DISPATCH" _
& " SET DISPATCH.FL_SC = " & QUT & Me![Text10] & QUT _
& " WHERE DISPATCH.FL_SC Is Null AND DISPATCH.BILL_TO = 'C1057' AND
DISPATCH.LOAD_DATE >= " & T2 & " AND DISPATCH.LOAD_DATE <= " & T4
dbs.Execute STRSQL2
dbs.Close
Set dbs = Nothing
End Sub