Can anyone tell me what is wrong with this SQL Satement when used in a MS Access 2007 CurrentDB.OpenRecordset command.
("SELECT tStatusChanged.AddressNumber, tStatusChanged.StatusNumber, tStatusChanged.StatusChangedDate" _
& " FROM tStatusChanged" _
& " WHERE tStatusChanged.StatusChangedDate <=#" & Format(tempDate, "mm/dd/yyyy") & "#" _
& " ORDER BY tStatusChanged.AddressNumber, tStatusChanged.StatusNumber")
Where tempDate is a Date type variable.
I am pretty sure its the <= that's incorrect but I am not sure what it should be.
Thanks.
("SELECT tStatusChanged.AddressNumber, tStatusChanged.StatusNumber, tStatusChanged.StatusChangedDate" _
& " FROM tStatusChanged" _
& " WHERE tStatusChanged.StatusChangedDate <=#" & Format(tempDate, "mm/dd/yyyy") & "#" _
& " ORDER BY tStatusChanged.AddressNumber, tStatusChanged.StatusNumber")
Where tempDate is a Date type variable.
I am pretty sure its the <= that's incorrect but I am not sure what it should be.
Thanks.