A
aquamatt
In the following, how do i change the date to read from a
cell.(uvwNFL_BatchReport.Start>={ts '2006-05-10 00:00:00'" , "})")
Any assistance will be welcome
Thanks
Full Code
With Selection.QueryTable
.Connection = _
"ODBC;DRIVER=SQL
Server;SERVER=citp2b;UID=citect;PWD=citect;APP=Microsoft Office
XP;WSID=CH-L-H8LP51S;DATABASE=NFL"
.CommandText = Array( _
"SELECT uvwNFL_BatchReport.BatchLogID,
uvwNFL_BatchReport.Pasteuriser, uvwNFL_BatchReport.Start,
uvwNFL_BatchReport.Finish, uvwNFL_BatchReport.Destination,
uvwNFL_BatchReport.TankProduct, uvwNFL_BatchR" _
, _
"eport.BatchProduct, uvwNFL_BatchReport.BatchVolumeReq,
uvwNFL_BatchReport.BatchVolumeDel" & Chr(13) & "" & Chr(10) & "FROM
NFL.dbo.uvwNFL_BatchReport uvwNFL_BatchReport" & Chr(13) & "" & Chr(10) &
"WHERE (uvwNFL_BatchReport.Start>={ts '2006-05-10 00:00:00'" _
, "})")
.Refresh BackgroundQuery:=False
End With
cell.(uvwNFL_BatchReport.Start>={ts '2006-05-10 00:00:00'" , "})")
Any assistance will be welcome
Thanks
Full Code
With Selection.QueryTable
.Connection = _
"ODBC;DRIVER=SQL
Server;SERVER=citp2b;UID=citect;PWD=citect;APP=Microsoft Office
XP;WSID=CH-L-H8LP51S;DATABASE=NFL"
.CommandText = Array( _
"SELECT uvwNFL_BatchReport.BatchLogID,
uvwNFL_BatchReport.Pasteuriser, uvwNFL_BatchReport.Start,
uvwNFL_BatchReport.Finish, uvwNFL_BatchReport.Destination,
uvwNFL_BatchReport.TankProduct, uvwNFL_BatchR" _
, _
"eport.BatchProduct, uvwNFL_BatchReport.BatchVolumeReq,
uvwNFL_BatchReport.BatchVolumeDel" & Chr(13) & "" & Chr(10) & "FROM
NFL.dbo.uvwNFL_BatchReport uvwNFL_BatchReport" & Chr(13) & "" & Chr(10) &
"WHERE (uvwNFL_BatchReport.Start>={ts '2006-05-10 00:00:00'" _
, "})")
.Refresh BackgroundQuery:=False
End With