473,395 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

VBA Create Table Statement - Syntax Error - Need Fresh Eyes

133 100+
Hi,

I need fresh eyes to see where my syntax error is occurring.

Any assistance would be appreciate.


Mary
Expand|Select|Wrap|Line Numbers
  1. CurrentDb.Execute ("CREATE TABLE tbl_FYData(PIDM Integer, " & _
  2.                                         "FY Varchar(2), " & _
  3.                                         "[PO Trans Date] DATETIME, " & _
  4.                                         "PO VARCHAR(8), " & _
  5.                                         "Index Varchar(6), " & _
  6.                                         "IndexApprAmt Varchar(4), " & _
  7.                                         "Item Integer, " & _
  8.                                         "NIGPCommCode Varchar(8), " & _
  9.                                         "NIGPDesc Varchar(150), " & _
  10.                                         "Unit Integer, " & _
  11.                                         "Qty Integer, " & _
  12.                                         "Total Integer,  " & _
  13.                                         "Buyer VARCHAR(4), " & _
  14.                                         "ShipCode VARCHAR(4), " & _
  15.                                         "Orgn VARCHAR(6), " & _
  16.                                         "Account Varchar(6), " & _
  17.                                         "[PO Amt] Integer, " & _
  18.                                         "[V Type Code] VARCHAR(2),  " & _
  19.                                         "[Last Name] VARCHAR(50), " & _
  20.                                         "[First Name] VARCHAR(50), " & _
  21.                                         "City VARCHAR(50), " & _
  22.                                         "State VARCHAR(50), " & _
  23.                                         "[Zip Code] VARCHAR(10), " & _
  24.                                         "[Entity Ind] VARCHAR(1))")
  25.  
Jul 25 '11 #1

✓ answered by Rabbit

Index is a reserved keyword in SQL.

3 2177
Rabbit
12,516 Expert Mod 8TB
Index is a reserved keyword in SQL.
Jul 25 '11 #2
dowlingm815
133 100+
Thank you, totally ignored that situation, which in past, I was well aware of that error.
Jul 25 '11 #3
NeoPa
32,556 Expert Mod 16PB
Mary, while you're here, check out Debug SQL String.
Jul 26 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Thomas Jerkins | last post by:
When I write a create table SQL statement I want to add some information about the column heading of each column. How does the exact syntax for the create table look like (which includes this column...
2
by: Alicia | last post by:
Does anyone know why I am getting a "Syntax error in Create Table statement". I am using Microsoft Access SQL View to enter it. Any other problems I may run into? CREATE TABLE weeks (...
1
by: Bhavesh1978 | last post by:
hey guys.. im trying to create a table in mysql in phpmyadmin was wondering weather is it right or wrong CREATE TABLE `User`( email varchar(32), fname varchar(32), lname varchar(32), pass...
4
by: gregpinero | last post by:
It's the strangest thing, I'm pulling some text out of a MySQL table and trying to run exec on it, and it keeps giving me a syntax error, always at the end of the first line. Thanks in advance...
1
by: gomzi | last post by:
I am getting an error no 150 when i try to create relationships between three tables. Here are the statements : - TABLE A create table a(id1 int(7),id2 int(7),primary key (id1)); TABLE B...
4
by: tasmontique | last post by:
Hello everyone, I keep getting a syntax error in my update statement. The only thing that I notice is that although the columns in my table have the same name as the fields on the form the...
4
by: nanabuch | last post by:
Hello, I am new to this forum, and I am a newbit in Oracle, I do have a background in MS Access, VBA, SQL server development and some Oracle backend development work. I have been giving a task...
6
by: patriciashoe | last post by:
I have been struggling with this update statement. At this point I get a syntax error if i go from SQL view to design view. Can anyone spot a problem? UPDATE teacherresources AS A SET...
8
by: Lars131 | last post by:
I'm working on a simple form to database program but I keep encountering a syntax error with my SQL statement. Since it's so long, I don't want to parameterize it, but I will if it's the only...
2
by: dowlingm815 | last post by:
Hi, In the following code, i keep getting a data conversion error at the fund field. In the code below, it takes data from a query and creates a table. It is a six digit alpha field within the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.