Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Thanks for the tip. That was exactly what I needed. "Vince" wrote: The following code works fine, but I need the date referenced in the query to update automatically with the date that is located in Cell A1 of the spreadsheet. I would appreciate any help given. Vince ---------------------------------------------------------------------------------------- With Selection.QueryTable .Connection = Array(Array( _ "ODBC;DSN=MS Access Database;DBQ=C:\ABBTemp\STK5.MDB;DefaultDir=C:\ABB Temp;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5" _ ), Array(";")) .CommandText = Array( _ "SELECT `Shift/Day Report`.Date, `Shift/Day Report`.`PRODUCTION TONS_DAY`" & Chr(13) & "" & Chr(10) & "FROM `C:\ABBTemp\STK5`.`Shift/Day Report` `Shift/Day Report`" & Chr(13) & "" & Chr(10) & "WHERE (`Shift/Day Report`.Date={ts '2004-04-01 00:00:00'})" & Chr(13) & "" & Chr(10) & "O" _ , "RDER BY `Shift/Day Report`.Date") .Refresh BackgroundQuery:=False End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pass parameter to access query | Links and Linking in Excel | |||
Pass date parameter into MS Query | Excel Discussion (Misc queries) | |||
Is it possible to pass a parameter into IN operator in Query? | Excel Discussion (Misc queries) | |||
How to pass a date in Excel to ms query | Excel Programming | |||
Pass a filename to a query | Excel Programming |