473,406 Members | 2,273 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,406 software developers and data experts.

How to create a table in access 2007 with AutoNumber Datatype

I want to create a table in access 2007 by query not in design view. My table should look like;
Serial AutoNumber
Name Text
Country Text
I am using the following query:
CREATE TABLE Details (Serial AutoNumber, Name TEXT, Country Text)


But its returning an error (Sysntax error in field definition ) with AutoNumber Highlighted .Plzz help
Aug 13 '10 #1
2 3639
... what i can tell is that to reste autonumber ina access is "CurrentDB.Execute "ALTER TABLE tablename ALTER COLUMN ColumName COUNTER(1,1)"

so try changing the data type to Counter...

hope thhis help
Aug 13 '10 #2
NeoPa
32,556 Expert Mod 16PB
As Dracko says, the thing to use is Counter(1,1), rather than AutoNumber. In fact you can create the table directly this way with :
Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE Details (Serial Counter(1,1),
  2.                       Name TEXT,
  3.                       Country Text);
A Best Answer for Dracko on this one may be appropriate :)
Aug 16 '10 #3

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

Similar topics

49
by: Allen Browne | last post by:
If you are looking for opinon on what's useful in Access 2007, there's a new article at: http://allenbrowne.com/Access2007.html Covers what's good (useful features), what's mixed (good and bad),...
2
by: ARC | last post by:
Just curious if anyone is having issues with Acc 2007 once the number of objects and complexity increases? I have a fairly large app, with many linked tables, 100's of forms, queries, reports, and...
1
by: blademike | last post by:
Hi guys, I'm new to Access & SQL. Currently using Access 2007. What I have: 1) Table: Employee( empID, empName, email, pwd, ... ) 2) Form: - Record source ( SELECT empName, email, pwd FROM...
12
bartonc
by: bartonc | last post by:
I just connected to the JET engine for the first time today using the Access ODBC connector and need some basics. I'm not even sure that Access (front end) experts are versed in SQL, but here goes:...
2
nico5038
by: nico5038 | last post by:
Access 2007 Linkedtable manager refuses to relink tables having a field with the "Attachment" datatype. Problem: When placing a split database in another folder, the Linked table manager should...
1
by: BMF | last post by:
Howdy, I am mainly a MySQL user but I have been playing with Access 07 a little bit recently. I created a database with 3 tables. Table ID --- userID -- AutoNumber UserInfo -...
1
by: amrit1123 | last post by:
I m working on ms access 2007. and i want to create a table which have a field of datatype attachment through query u .like this (create table tablename (name varchar);). so, how to create a table...
1
by: Paldrion | last post by:
How Can I Automatically add an AutoNumber field to a table in Access 2007? If code is needed, please include how I would use the code in an access module, so I can automate this with a macro.
1
by: Paldrion | last post by:
I will need it to be in VBA, since I need to put it in an Access 2007 database and execute it with an Access macro. What I am doing is using a utility to find the hard drives' conditions on...
5
by: sphinney | last post by:
Basic question: Does anyone know how to go about adding a control to an Access 2007 form that will allow viewing a Word 2007 document? Reason for asking: My office is about to receive 100+/-...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.