[AccessD] Reset Autonumber (WAS: Autonumber Assigned Immediately)

John W. Colby jwcolby at colbyconsulting.com
Fri Sep 9 12:55:59 CDT 2005


Ken,

Does this method work for tables with data already in them, or only empty
tables?

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Ken Ismert
Sent: Friday, September 09, 2005 1:39 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Reset Autonumber (WAS: Autonumber Assigned Immediately)


 
I use a Data-Definition SQL statement:

ALTER TABLE TableName ALTER COLUMN AutoField COUNTER (1,1); 

The first number is the starting value, and the second is the increment.

This works for A2K and later.

-Ken

>> Remind me in the morning, but I know there is a
>> property within an ADO recordset, that if you 
>> remove all the records, you can 'reset' the 
>> Autonumber (the property is the 'next' number, 
>>> if I remember correctly....)

>> Drew

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list