Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
Im creating a database that has a form for the header with the main record details, then a sbuform for a numbered list of products on said main record.
For the numbered list I thought I should use autonumber, but how do I get the autonumber to reset back to one when I start a whole new record?
AMD Athlon XP 1.8GHz
1GB RAM
120GB HDD SATA
GeForce 4 Ti4600 128MB
Nvidia nforce2 chipset w/ soundstorm
Pioneer DVD/RW
ABIT NF-7S Rev 2 Motherboard

You cant. Autonumber creates a unique number for every record created. If you had the ability to reset the number back to one the numbers wouldn't be unique anymore and would defeat the object of autonumber.
If you want a numbering system that automatically increments then returns to one at some time you are going to have to programme it yourself.
Stuart

I also had the same need to reset an autonumber table for a unique situation. A sales database that I was programming had a lot of garbage data from testing and debugging. I wanted to reset the table and the order count for real sales to be entered.
Solution: Copy and paste (Ctrl-c/Ctrl-v) the autonumbered table in question and then, when prompted, only copy the structure and not the contents. When the structure (only) is copied you will have a blank table which will start counting again from 1. In my case only real sales are to be entered from this point on.
Otherwise, as the previous poster mentioned, trying to reset autonumber within a table defeats the purpose of having autonumber in the first place.
Good luck.
Ed

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |