Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
I searched and found several posts and tried to use them to find out where I am going wrong but no luck. I am attempting to run a query from a database that will look to a specific sheet in the workbook for the date range to be used. This works: "SELECT `Time ( < 16 )`.`Employee ID`, `Time ( < 16 )`.`System ID`, `Time ( < 16 )`.`Project Code`, `Time ( < 16 )`.SumOfHours, `Time ( < 16 )`.`First Name`, `Time ( < 16 )" _ , "`.`Last Name`" & Chr(13) & "" & Chr(10) & "FROM `X:\Time\TKS`.`Time ( < 16 )` `Time ( < 16 )`") This doesn't: "SELECT `Time ( < 16 )`.`Employee ID`, `Time ( < 16 )`.`System ID`, `Time ( < 16 )`.`Project Code`, `Time ( < 16 )`.SumOfHours, `Time ( < 16 )`.`First Name`, `Time ( < 16 )" _ , "`.`Last Name`" & Chr(13) & "" & Chr(10) & "FROM `X:\Time\TKS`.`Time ( < 16 )` `Time ( < 16 )`" & Chr(13) & "" & Chr(10) & "WHERE(`Time ( < 16 )`.Date)10/10/06") It returns a general odbc error. I added : & Chr(13) & "" & Chr(10) & "WHERE(`Time ( < 16 )`.Date)10/10/06") Any help is appreciated. The ultimate goal is to have the 10/10/06 reference two cells and possibly have a from and to selection but I had seen enough on the variable piece I figure I could do that once I had the basics down. Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
syntax error in VBA in query from Access | Excel Discussion (Misc queries) | |||
Excel 2007 MS Query prompt yields Syntax error | Excel Discussion (Misc queries) | |||
runtime error: syntax error or access violation | Excel Programming | |||
MS Query import from Excel - Syntax Error | Excel Discussion (Misc queries) | |||
Syntax Error in Excel Query for DATE field | Excel Discussion (Misc queries) |