![]() |
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
|
|||
|
|||
![]()
Hi All, I would like to know if it is possible to renumber an auto number
field, I know this is scoffed upon and goes against the principals of database management, but i would really like to know if it can be done. I am currently using data imported from an excel sheet which my company uses for a tracking system, I intend to start a fresh table when I have finished writing and testing the database so would like this new table to start at a number beyond the current excel sheet. What is the easiest way to start the new table at 20000 Thanks |
#2
|
|||
|
|||
![]()
You've said "how", but not why ...
If you'll describe the business need you are trying to solve, folks here may be able to offer appropriate suggestions. .... or maybe you've already decided which approach you are going to use, and just want someone to tell you which button to push... Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "blake7" wrote in message ... Hi All, I would like to know if it is possible to renumber an auto number field, I know this is scoffed upon and goes against the principals of database management, but i would really like to know if it can be done. I am currently using data imported from an excel sheet which my company uses for a tracking system, I intend to start a fresh table when I have finished writing and testing the database so would like this new table to start at a number beyond the current excel sheet. What is the easiest way to start the new table at 20000 Thanks |
#3
|
|||
|
|||
![]()
Hi Wayne, Never thought of that, were do you place the max lookup +1
statement and how is it writen etc Thanks "Wayne-I-M" wrote: This really isn't what autonumbers are for. The only thing they do is to provide a unique set of data - eg. so you can identify a record, etc. It is a BIG mistake to use them for anything other than as a unique reference. I suppose if you really wanted to you could just create a record then copy it and paste append. Then copy the 2 records and paste append then the 4 records etc etc etc until you have 19999 records but this is just silly Why not not just add a number field to your table add 19999 into it and then auto incremet this field (use a max lookup +1). Much better. -- Wayne Manchester, England. "blake7" wrote: Hi All, I would like to know if it is possible to renumber an auto number field, I know this is scoffed upon and goes against the principals of database management, but i would really like to know if it can be done. I am currently using data imported from an excel sheet which my company uses for a tracking system, I intend to start a fresh table when I have finished writing and testing the database so would like this new table to start at a number beyond the current excel sheet. What is the easiest way to start the new table at 20000 Thanks |
#4
|
|||
|
|||
![]()
Hi
There are lot of ways to use it I don't really understand what you're trying to do but if it were me (I like to check stuff 1st) I would import all you data into a table then either loop through the records with a dmax + 1 on your new field (20,000) or you could use a query to add it to the field in the table. There are zillions of examples on google (search on "ms access dmax +1"), just have a look around and see which method suits your needs best. -- Wayne Manchester, England. "blake7" wrote: Hi Wayne, Never thought of that, were do you place the max lookup +1 statement and how is it writen etc Thanks "Wayne-I-M" wrote: This really isn't what autonumbers are for. The only thing they do is to provide a unique set of data - eg. so you can identify a record, etc. It is a BIG mistake to use them for anything other than as a unique reference. I suppose if you really wanted to you could just create a record then copy it and paste append. Then copy the 2 records and paste append then the 4 records etc etc etc until you have 19999 records but this is just silly Why not not just add a number field to your table add 19999 into it and then auto incremet this field (use a max lookup +1). Much better. -- Wayne Manchester, England. "blake7" wrote: Hi All, I would like to know if it is possible to renumber an auto number field, I know this is scoffed upon and goes against the principals of database management, but i would really like to know if it can be done. I am currently using data imported from an excel sheet which my company uses for a tracking system, I intend to start a fresh table when I have finished writing and testing the database so would like this new table to start at a number beyond the current excel sheet. What is the easiest way to start the new table at 20000 Thanks |
Thread Tools | |
Display Modes | |
|
|