Autonumbers

octatyan

Registered User.
Local time
Today, 08:06
Joined
Jan 10, 2003
Messages
36
I have two questions regarding autonumbers:

1. In the table, I have my primary key as an autonumber. I also have a form that allows people to input/edit records. The autonumber field has been locked because the computer will automatically assign a number for this, but the field still says "(autonumber)". How do I make the field in the form not display "(autonumber)".

2. When you add new records, the autonumber will assign 1, 2, 3, 4, etc... but since i'm still new to access, I enter "dummy" records to just test things out but I then delete it. but the next autoassigned number will continue to increase so in my table, the autonumbers may look like 1,2,3, 6,12,23. Is there a way that autonumber will assign the next sequential number based on what the highest autonumber currently is? (ex. If i enter a dummy record and the autoassign number is 6, and then i delete this record, I want the next autoassign number to be 6 again, instead of 7). Is VB the only way to do this?

please help.
thanks!
 
1. Since the Autonumber can be viewed as soley the database's way of uniquely identifing each record, you can often get away with not showing it at all. After all, if the user can't manipulate it, why does he need to see it.
Alternatively you could hide the control that displays the Autonumber whenever the form's NewRecord property is equal to True...

2. As far as reusing Autonumbers, then only way I know to do this is to compact the table in question. I have only READ that this is possible. However my first point remains and I would question if sequencial record ID's are really required.
You could emulate the Autonumber yourself but I think it's a can or worms...
Chris
 

Users who are viewing this thread

Back
Top Bottom