A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to delete table contents and reset autonumber counters



 
 
Thread Tools Display Modes
  #1  
Old September 7th, 2005, 04:21 AM
Siegfried Heintze
external usenet poster
 
Posts: n/a
Default How to delete table contents and reset autonumber counters

When I delete my table contents (but not the table definitions) the auto
number counters are not reset. Is there a way to reset them?

Thanks,
Siegfried


  #2  
Old September 7th, 2005, 05:22 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Simplest way is to compact the database after deleting all records. That
should work in all versions of Access: if not, apply the latest service
packs for Office and JET, from:
http://support.microsoft.com/gp/sp

If you need to do it programmatically, it is possible in Access 2000 and
later to set the Seed of the Column in the Table, using the ADOX library.
There's a (rather involved) example of how to use these properties in this
link:
http://allenbrowne.com/ser-40.html

--
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.

"Siegfried Heintze" wrote in message
...
When I delete my table contents (but not the table definitions) the auto
number counters are not reset. Is there a way to reset them?



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table autonumbers - possible reset? Bob General Discussion 2 September 16th, 2004 11:03 AM
Reset Textbox Contents Andrew Wilkins Using Forms 1 August 19th, 2004 03:00 PM


All times are GMT +1. The time now is 10:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.