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

I'm blanking out right now........I'm receiving a syntax error message when I
run this statement...

cnn.Execute _
"CREATE TABLE tblOutput(" & _
& Field1 & "VARCHAR NOT NULL," & _
& Field2 & "VARCHAR(20) NOT NULL," & _
& Field3 & "VARCHAR(20) NOT NULL)"


Field1, Field2, Field3 are variables.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Syntax Error help

Drop the extra ampersands (&) and add spaces before VARCHAR.. ??

cnn.Execute _
"CREATE TABLE tblOutput(" & _
Field1 & " VARCHAR NOT NULL, " & _
Field2 & " VARCHAR(20) NOT NULL, " & _
Field3 & " VARCHAR(20) NOT NULL)"



"Markantesp" wrote:

I'm blanking out right now........I'm receiving a syntax error message when I
run this statement...

cnn.Execute _
"CREATE TABLE tblOutput(" & _
& Field1 & "VARCHAR NOT NULL," & _
& Field2 & "VARCHAR(20) NOT NULL," & _
& Field3 & "VARCHAR(20) NOT NULL)"


Field1, Field2, Field3 are variables.

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 Q John[_78_] Excel Programming 0 December 22nd 04 10:01 AM
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


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