PC Review


Reply
Thread Tools Rate Thread

Changing the seed of Autonumber ?

 
 
Phil Hunt
Guest
Posts: n/a
 
      6th Jul 2004
I remember seeing some post on how to change the seed of autonumber, can
someone kindly respost it ?

Thanks


 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      6th Jul 2004
In Access 2000 and later, you can set the Seed of an AutoNumber field
directly with ADOX code.

This example is a bit more than you need. It loops through all your
TableDefs, to automatically reset the Seed where it is below the maximum
used:
http://allenbrowne.com/ser-40.html

If you wish to raise the value, you can import a record that assigns a value
to the AutoNumber field. Example:
http://allenbrowne.com/ser-26.html

To lower the Seed after deleting records, just compact the database.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Phil Hunt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I remember seeing some post on how to change the seed of autonumber, can
> someone kindly respost it ?



 
Reply With Quote
 
Phil Hunt
Guest
Posts: n/a
 
      6th Jul 2004
thanks. will check it out.


"Allen Browne" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In Access 2000 and later, you can set the Seed of an AutoNumber field
> directly with ADOX code.
>
> This example is a bit more than you need. It loops through all your
> TableDefs, to automatically reset the Seed where it is below the maximum
> used:
> http://allenbrowne.com/ser-40.html
>
> If you wish to raise the value, you can import a record that assigns a

value
> to the AutoNumber field. Example:
> http://allenbrowne.com/ser-26.html
>
> To lower the Seed after deleting records, just compact the database.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Phil Hunt" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I remember seeing some post on how to change the seed of autonumber, can
> > someone kindly respost it ?

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-Seed Autonumber Field in a Remote Access Database RDub Microsoft Access Form Coding 5 19th May 2008 07:52 AM
set seed on msaccess autonumber =?Utf-8?B?U3RhbmxleQ==?= Microsoft Access Form Coding 1 24th Sep 2007 03:31 PM
DataTable AutoNumber Seed Nitin Microsoft VB .NET 4 7th Mar 2005 09:26 AM
Changing the Value of an Autonumber =?Utf-8?B?U2FtbXlhNjY=?= Microsoft Access Getting Started 3 25th Feb 2005 03:15 PM
Changing Autonumber =?Utf-8?B?c21ib3lk?= Microsoft Access Forms 1 29th Dec 2004 03:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:17 AM.