Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default pivot table Commandtext causes runtime error 1004 in excel 2000

Please help...

I have this code running fine under Excel2003...

ActiveWorkbook.PivotCaches(2).CommandText = _
"SELECT BKS.BKS_BookAmt, BKS.BKS_BookDate, BKS.BKS_SalesOrderID,
BKS.BKS_TerritoryCodes, IMA.IMA_ItemName, 'CAT
'+substring(IMA.IMA_Classification,1,1) AS 'CATEGORY' FROM {oj IERP60.dbo.BKS
BKS LEFT OUTER JOIN IERP60.dbo.IMA IMA ON BKS.BKS_ItemID = IMA.IMA_ItemID}
WHERE (BKS.BKS_BookDate Between '" & strDateFrom & "' And '" & strDateTo &
"')"

* i have intentionally remove some of the selected fields to shorten the
query here...

But when i ran esame code using Excel2000 on a different machine, i got the
run tim error 1004 - Application Defined or Object Defined Error

err.raise gave me an Argument not Optional error

Can anybody please help me out with this one?
Reply
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
excel chart export error runtime 1004 Mau Charts and Charting in Excel 3 August 17th 05 11:35 AM
excel chart export error runtime 1004 Mau[_2_] Excel Programming 0 August 4th 05 09:53 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
excel 2002 runtime error 1004 xenod Excel Programming 3 April 6th 05 09:40 AM
Excel 2002 Data Forms runtime error 1004 Charles Osborne Excel Programming 6 May 2nd 04 03:46 AM


All times are GMT +1. The time now is 05:11 AM.

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

About Us

"It's about Microsoft Excel"