Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2007

Tip: Looking for answers? Try searching our database.

How to Intilize Auto Number Field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NewsGroup - 14 Mar 2007 11:16 GMT
Dear Friends,

I am the new in this group, I have a problem that how to intilize the auto
number fields, If I want to restart auto number from 1,  what i do ?

Please reply

Thanks

Waseem
Allen Browne - 14 Mar 2007 11:33 GMT
The AutoNumber starts from 1 by default.

If you have already had data in the table and deleted it, compact the
database to reset the seed:
   Tools | Database Utilities | Compact/Repair
or in Access 2007:
   Office Button | Manage | Compact/Repair

To programmatically set the Seed to a higher number, see:
   http://allenbrowne.com/ser-26.html
   http://allenbrowne.com/func-ADOX.html#ResetSeed

To programmatically delete the data and reset the seed:
   http://allenbrowne.com/func-ADOX.html#DeleteAllAndResetAutoNum

Signature

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.

> Dear Friends,
>
> I am the new in this group, I have a problem that how to intilize the auto
> number fields, If I want to restart auto number from 1,  what i do ?
Ofer Cohen - 14 Mar 2007 11:38 GMT
Compact and repair on the MDB where the table is located in will intilize the
auto number back to 1. but that if there are no records in that table.

Signature

Good Luck
BS"D

> Dear Friends,
>
[quoted text clipped - 6 lines]
>
> Waseem
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.