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 Working with ODBC and filtering data

I hava a pivot table that I would like to change the date
on with an imput box. The string reads:
ActiveSheet.PivotTableWizard SourceType:=xlExternal,
SourceData:=Array( _
"SELECT WORKORDER.LEADCRAFT, WORKORDER.REPORTDATE,
WORKORDER.WONUM, WORKORDER.STATUS, WORKORDER.PROBLEMCODE,
WORKORDER.GLACCOUNT, WORKORDER.WORKTYPE,
WORKORDER.SUPERVISOR, WORKORDER.WOPRIORITY" & Chr(13) & ""
& Chr(10) & "FROM MA", _
"XIMO.WORKORDER WORKORDER" & Chr(13) & "" & Chr
(10) & "WHERE (WORKORDER.WORKTYPE='PM') AND
(WORKORDER.SUPERVISOR In
('MAXPLN1','MAXPLN2','MAXPLN3','MAXPLN4')) AND
(WORKORDER.WOPRIORITY=6) AND (WORKORDER.STATUS In
('INPRG','WAPPR'", _
",'WMATL','WSCH')) AND (WORKORDER.REPORTDATE<
{ts '2002-12-23 00:00:00'})" & Chr(13) & "" & Chr(10)
& "ORDER BY WORKORDER.LEADCRAFT" _
),
Connection:="ODBC;DSN=TEM;DBQ=sandusky.world;UID=M AXOPR1;PW
D=maxopr1"
ActiveSheet.PivotTables("PivotTable1").SmallGrid =
False
ActiveSheet.PivotTables("PivotTable1").AddFields
RowFields:="LEADCRAFT", _
ColumnFields:="GLACCOUNT", PageFields:="SUPERVISOR"


I would like to be able to change the date {ts '2002-12-23
00:00:00'} by entering a date in on a work sheet or a
message box. Is there a way to do this?
 
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
pivot table filtering not working Carl Henthorn Excel Worksheet Functions 0 May 8th 08 12:07 AM
ODBC data insert to Oracle renee New Users to Excel 0 October 18th 05 08:37 PM
Excel ODBC add-in not working properly bromello Setting up and Configuration of Excel 1 February 11th 05 10:26 PM
Refreshing data from ODBC automatically? John E.P. Hynes Excel Programming 1 November 21st 03 04:23 PM
Importing ODBC Data .. anywhere?? Ignacio Excel Programming 0 September 29th 03 11:07 AM


All times are GMT +1. The time now is 10:08 PM.

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"