A.D.Tejpal
adtp at touchtelindia.net
Thu May 6 12:46:25 CDT 2004
Paul,
Settings for AutoNumbers in a table can be customized through SQL Specific Query (In Query Design View, Click Query -> SQL Specific). Sample SQL statements are given below -
(a) Modifying an existing Table -
ALTER TABLE T_Books ALTER COLUMN BookID COUNTER (2000, 10)
The above Query when run, modifies the settings for AutoNumbers In Column [BookID] Of Table [ T_Books] as follows -
StartValue (Henceforth) = 2000
Increment Value (Henceforth) = 10
(If AutoNumber field is also the Primary Key, New start value should be so chosen as not to result in duplication of any existing value)
(b) Creating a new Table -
CREATE TABLE T_Books (BookID AUTOINCREMENT (2000, 10), Title Text)
This creates a new Table with two columns i.e. [BookID] of AutoNumber type starting at 2000 (Increment = 10) and [Title] of Text type.
Note - KeyWords AUTOINCREMENT and COUNTER can be used interchangeably
Regards,
A.D. Tejpal
-----------------
----- Original Message -----
From: paul.hartland at fsmail.net
To: accessd
Sent: Thursday, May 06, 2004 17:54
Subject: [AccessD] Autonumber To Start From 900120
To all,
Is there a way of telling the Autonumber where to start from in a Database ?
Thanks in advance.
Paul