Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Syntax Error
Greetings!
I have a form where a user can select a field (Group Name) and after pressing OK it should show some records. The code I have doesn't run because I get "Compile Error: Syntax Error". The SQL string in the VBA Macro is (got it with Macro Recorder): ..CommandText = Array( _ "SELECT Groups.`Group Name`, `Flown Revenue 2005`.`Agent Code`, Sum(`Flown Revenue 2005`.Coupons) as [Cpns]" & Chr(13) & "" & Chr(10) & "FROM {oj `C:\My Documents\Temporário\Unify\db2006 November-onward Compact`.`Flown Revenue 20" _ , _ "05` `Flown Revenue 2005` LEFT OUTER JOIN `C:\My Documents\Temporário\Unify\db2006 November-onward Compact`.Groups Groups ON `Flown Revenue 2005`.`Agent Code` = Groups.`Agent Code`}" & Chr(13) & "" & Chr(10) & "WHERE Groups.`Group Name`" & " = " & cmdComboBox.Text &" Chr(13) & "" & Chr(10) & "GROUP BY Groups.`G" _ , "roup Name`, `Flown Revenue 2005`.`Agent Code`") I can't see where is the Syntax Error. Please help Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
syntax error | Excel Programming | |||
runtime error: syntax error or access violation | Excel Programming | |||
runtime error: syntax error or access violation | Excel Programming | |||
variable not declared error & syntax error | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming |