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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
autonumber
I have a table with a primary id, data type is autonumber. My issue is: the
table had some data in it. I deleted the data. Now I am trying to enter new data, the autonumber is not starting from 1, 2, etc...it starts at the last number before the data got deleted (19,20,etc). How can I make fix it. I hope I am not confusing you. Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200612/1 |
#2
|
|||
|
|||
autonumber
1) Delete the data from your current database.
2) Create a new blank database 3) Import all controls from old database 4) The Autonumber of your table will now be reset at 1 ielmrani wrote: I have a table with a primary id, data type is autonumber. My issue is: the table had some data in it. I deleted the data. Now I am trying to enter new data, the autonumber is not starting from 1, 2, etc...it starts at the last number before the data got deleted (19,20,etc). How can I make fix it. I hope I am not confusing you. Thanks -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200612/1 |
#3
|
|||
|
|||
autonumber
That's exactly how Autonumbers are meant to behave.
Autonumbers exist for one purpose only: to provide a (practically guaranteed) unique value that can be used as a primary key. That purpose is fulfilled by 19, 20, 22 just as well as by 1, 2, 3. It's actually considered normal not to even show the value of the Autonumber field to the users. If you're trying to assign some meaning to the value of the Autonumber field, then you likely shouldn't be using Autonumbers. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "ielmrani via AccessMonster.com" u21259@uwe wrote in message news:6ab6855a96ee0@uwe... I have a table with a primary id, data type is autonumber. My issue is: the table had some data in it. I deleted the data. Now I am trying to enter new data, the autonumber is not starting from 1, 2, etc...it starts at the last number before the data got deleted (19,20,etc). How can I make fix it. I hope I am not confusing you. Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200612/1 |
#4
|
|||
|
|||
autonumber
Worked. Thank you very much.
missinglinq wrote: 1) Delete the data from your current database. 2) Create a new blank database 3) Import all controls from old database 4) The Autonumber of your table will now be reset at 1 I have a table with a primary id, data type is autonumber. My issue is: the table had some data in it. I deleted the data. Now I am trying to enter new data, the autonumber is not starting from 1, 2, etc...it starts at the last number before the data got deleted (19,20,etc). How can I make fix it. I hope I am not confusing you. Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200612/1 |
#5
|
|||
|
|||
autonumber
"ielmrani via AccessMonster.com" u21259@uwe wrote in message
news:6ab6fa11cd4c8@uwe... Worked. Thank you very much. It worked but you're using AutoNumber for the wrong purpose. AutoNumber is intended for indexing purposes internal to Access. If you want unique and sequential numbering, try this as the default value of a text box bound to a numeric field: Nz(DMax("MyField","MyTable"))+1 where MyField is the name of your field and MyTable is the name of the table containing the field. Keith. www.keithwilby.com |
#6
|
|||
|
|||
autonumber
thank you guys for the info.
Douglas J. Steele wrote: That's exactly how Autonumbers are meant to behave. Autonumbers exist for one purpose only: to provide a (practically guaranteed) unique value that can be used as a primary key. That purpose is fulfilled by 19, 20, 22 just as well as by 1, 2, 3. It's actually considered normal not to even show the value of the Autonumber field to the users. If you're trying to assign some meaning to the value of the Autonumber field, then you likely shouldn't be using Autonumbers. I have a table with a primary id, data type is autonumber. My issue is: the [quoted text clipped - 5 lines] hope I am not confusing you. Thanks -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|