fatbloater
asked on
Autonumber Reset To 1 Without Deleting Current Records
I there a way yo reset the autonumber to 1 without deleting/losing any current data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"more" info @ http://www.mvps.org/access/general/gen0006.htm
ASKER
But wont i then lose the current number?
The current autonumber is part of a reference that identifies each case, i cant lose this data.
Now its a new financial year i need to reset my reference to 1 but keep the old references.
This is not the PK.
The current autonumber is part of a reference that identifies each case, i cant lose this data.
Now its a new financial year i need to reset my reference to 1 but keep the old references.
This is not the PK.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Then I guess it's impossible.
Lol - I just don't type fast enough.
Can't you create a new Long field, update it to the current autonumber values and then follow Dhaest's solution?
btw, why would you want to reset the autonumber when it is part of a relationship?
The autonumber should be used in the background, meaningless to a user.
for your invoices (i guess its that...) you should use (add) another field, and use that one. (index it, but double values must be permitted)
The autonumber should be used in the background, meaningless to a user.
for your invoices (i guess its that...) you should use (add) another field, and use that one. (index it, but double values must be permitted)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry Paurths - your post wasn't there when I posted...
:-)
:-)
ASKER
The autonumber is used to produce the id, its not the id itself. When someone registers the it looks at the autonumber and coies the number to make th ref.
When i delete it to reset it still puts in values to account for the records that i still have in the table.
When i delete it to reset it still puts in values to account for the records that i still have in the table.
ASKER
I just have to re-type that -
The autonumber is used to produce the id, its not the id itself. When someone registers a record it looks at the autonumber and copies the value to make the ref.
When i delete the autonumber to reset it, it still puts in values to account for the records that i still have in the table.
Thats better ;-)>
The autonumber is used to produce the id, its not the id itself. When someone registers a record it looks at the autonumber and copies the value to make the ref.
When i delete the autonumber to reset it, it still puts in values to account for the records that i still have in the table.
Thats better ;-)>
So you're using autonumber (indirectly) to mean something to the user....
You shuold generate an ID a different way, if you need it to mean something.
Autonumber can skip numbers and change - particularly after compacting
You shuold generate an ID a different way, if you need it to mean something.
Autonumber can skip numbers and change - particularly after compacting
ASKER
How would you suggest - there are 8 people using this database.
I tried having a table and adding +1 to it each time, but thought it would be worse -do you think i should go back to this method?
I tried having a table and adding +1 to it each time, but thought it would be worse -do you think i should go back to this method?
bloater - incrementing the number is the way that i'd go...
:-)
:-)