Auto Number Field

G

Guest

I have created auto no field. I was doing testing of database and hence have
fed in lot of data for testing purpose. Now i want to delete data and give it
for live data entry. Problem arises, that auto no field has already assigned
few values and whenever fresh values are insterted auto value field has next
value. Eg if i have entered 70 transactions for testing, auto field has
generated 1-70 values. Now if i clear database and give it to users, the next
value in auto field is 71 but i wanted to start with 1. Please help.
 
G

Guest

After the records are deleted from the table, you need to run Compact and
repair on the DataBase, that will initiate the AutoNumber back to 1.

For future reference, the autonumber wont fill up holls in the record, so if
you delete a record in the middle it wont be automatically filled
 
J

Joseph Meehan

Sandy said:
I have created auto no field. I was doing testing of database and
hence have fed in lot of data for testing purpose. Now i want to
delete data and give it for live data entry. Problem arises, that
auto no field has already assigned few values and whenever fresh
values are insterted auto value field has next value. Eg if i have
entered 70 transactions for testing, auto field has generated 1-70
values. Now if i clear database and give it to users, the next value
in auto field is 71 but i wanted to start with 1. Please help.

I suggest you may not want to use Autonumber for that use. Autonumbers are
designed to provide unique numbers. It in not designed to provide numbers
in order and for a number of reasons may not do so. As a result using them
in any application where the user sees the numbers is likely to end up with
confusion.

There are other ways of providing the numbers you want depending on the
particual application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top