Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Syntax error Q


Could anyone point out the mistake in the line below, its a syntax error,
I've a feeling its got to do with the 'FromDate' and 'ToDate' part

..CommandText = Array("SELECT tblSalesMixHistory.StoreNo,
tblSalesMixHistory.SalesDate, tblSalesMixHistory.Item,
tblSalesMixHistory.MenuSortName, tblSalesMixHistory.Sold" & Chr(13) & "" &
Chr(10) & "FROM `E:\History`.tblSalesMixHistory tblSalesMixHistory" &
Chr(13) & "" & Chr(10) & "WHERE (tblSalesMixHistory.Item=100) AND
(tblSalesMixHistory.SalesDate={ts '" & (FromDate) & "'} And
tblSalesMixHistory.SalesDate<={ts '" & (ToDate) & "'}) AND
(tblSalesMixHistory.Item=101) AND (tblSalesMixHistory.SalesDate={ts '" &
(FromDate) & "'} And tblSalesMixHistory.SalesDate<={ts '" & (ToDate) & "'})
AND (tblSalesMixHistory.Item=102) AND (tblSalesMixHistory.SalesDate={ts '"
& (FromDate) & "'} And tblSalesMixHistory.SalesDate<={ts '" & (ToDate) &
"'})" & Chr(13) & "" & Chr(10) & "ORDER BY tblSalesMixHistory.StoreNo,
tblSalesMixHistory.SalesDate, tblSalesMixHistory.Item")


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
Syntax error Neil Pearce Excel Discussion (Misc queries) 4 November 21st 08 04:55 PM
syntax error - help Jim May Excel Discussion (Misc queries) 2 August 23rd 07 09:08 PM
Syntax error. David McNally Excel Programming 3 April 28th 04 02:57 AM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM
Where is my syntax error? Mike Excel Programming 2 December 16th 03 10:43 PM


All times are GMT +1. The time now is 01:36 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"