LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default query table macro

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=Mic rosoft 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM
VB way to remove the query from a Query Table? Toby Erkson[_3_] Excel Programming 4 October 29th 04 03:16 PM
Workbook Open macro/& Pivot Table Calculated field query Jeff Standen Excel Programming 0 May 4th 04 04:48 PM
Workbook Open macro/& Pivot Table Calculated field query Bob Phillips[_6_] Excel Programming 0 May 4th 04 04:00 PM
Workbook Open macro/& Pivot Table Calculated field query Frank Kabel Excel Programming 0 May 4th 04 03:55 PM


All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"