Autonumber Question

04-14-2004, 11:06 PM
First excuse me because I don't have any code to post.

I am looking at moving certain records from one database table (Access 2000) to another for temporary work. However in the 2nd table I have an autonumber field, is it possible through code to reset the number value; of the autonumber? I always need this field to start out at 1, each time I import new data. I will emptying the table prior to importing new records.

Or would it be better to delete the table and recreate a temp table each time I move data from one to the other? I will be moving no more than 2000 rows at a time, with about 9 fields. I would prefer the first option but I can't seem to find any information about doing so.

Thanks in advance for any insight, links or comments.

04-14-2004, 11:20 PM it possible through code to reset the number value; of the autonumber? .

No. You cant through code. Youll either have to reset it manually through the table properties or not puting setting as autonumber in the firstplace - and in your code, you do the incrementing function.

04-15-2004, 12:06 AM
Or can you?..

04-15-2004, 12:11 AM
Or can you?..

Yes you can... :D

04-15-2004, 06:39 AM
Hmmm..not sure what the benefit is to resetting an autonumber. Access really isn't a true database this Autonumber field is really just a unqiue doesn't do much else for you. Sure, it provides an indexed, unqiue record-scan starting point, but if the current autonumber is 245, what is the benefit of changing it to something else? This won't help your performance in any way, and a unique number is a unique number....just my two cents.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum