& " WHERE(((DutyLogs.ReportDate) = #" & LastDate & "#))"
producing error Advantage SQL Engine Expected lexical element not found
')'
LastDate = dvFuel(dvFuel.Count - 1).Item("ReportDate")
Value of LastDate when running is LastDate = #8/23/2005 9:31:14 AM#
Adding one of these ) has no effect!
Complete sql statement is
sql = "SELECT Fuel.ReportDate, DutyLogs.Province,
DutyLogs.ReportDate " _
& " FROM (Fuel INNER JOIN CompanyDevices ON Fuel.DeviceID =
CompanyDevices.DeviceID) " _
& " INNER JOIN DutyLogs ON CompanyDevices.ClientID =
DutyLogs.ClientID " _
& " WHERE(((DutyLogs.ReportDate) = #" & LastDate & "#))"
Can anyone help?
Waseem
--
Thanks
Waseem Naik