Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Syntax error | Excel Discussion (Misc queries) | |||
syntax error - help | Excel Discussion (Misc queries) | |||
Syntax error. | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming | |||
Where is my syntax error? | Excel Programming |