View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dan[_3_] Dan[_3_] is offline
external usenet poster
 
Posts: 8
Default ODBC excel Macro help needed

I understand. And I am no programmer. At least not in 20 years but that is
the only way it will work.

This is wierd though. I just took one of my working macros and deleted just
one of the CR LF (the one after the SELECT stmnt) in a statement and it
worked. Then I deleted the other two (after FROM and WHERE stmnts) and I get
this error "Run-time error '1004': SQL Syntax Error"

By the way if there is a better way to do ODBC queries in a macro let me
know. Like the connection statement. Can I connect once to the database and
then just call the tables that I need?

Back to my original problem: Could something have changed in Excel 2007? I
save my work and got on my onter computer running Excel 2003 and it worked.
I finished up the entire program and saved it. Pulled it up in Excel 2007
and I got the error. Strange.

Dan

"Bill Renaud" wrote in message
. ..
I have never seen Carriage Return and Line Feed embedded in the middle
of an SQL query before.
Anybody else know if this is legal syntax?

(There may be something else wrong with your overall code; I just
happened to spot something that stood out.)
--
Regards,
Bill Renaud