Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autonumber...

Status
Not open for further replies.

AZSEEK

Programmer
Feb 13, 2003
84
US
is there a function in Access that will re-number assigned auto number for example if i wanted to start at a certain number other then 1 or the next available number...

or for example I wanted to add 500,000 to the value in the autonumber field so I could merge tables from two various databases...
 
now way to actually re-number an auto number field. An approach / work-around oft mentioned here is to delete the field, then re-create it. The new numbering will start at 1 and be sequential to the number of records. For "merging" to tables with some (Large) offset, you can get Ms. A. to introduce a new record with an (un-used) value (your 500K?) and all records added thereafter would increment from that value, so by adding a record with an artifically inflated value (499999), and then simply appending the new table -(W/OUT the autonumber field)- the added records should all be offset.

Then, you simply have a new / different problem as any additional records would sinply have incremental numbers from the last record and thus be indistinguishable as to their "origin".

In my opinion, the whole deal is simply not worth the bother. It is certainly retro if the autonumber has any use/signifance/indicies/relationships ... to any other information or is used in ANY maner within the db.

If the autonumber is totally un-used for any purpose, it is un-neceaasry and should be discarded. If it has a use, then the proposal to alter it is -at mininum- hazzardous.



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Trust Mr. MichaelRed. Combining different number sequences will lead to problems.
But if you need to know the original sequence numbers of the table you're combining, how about create a cross reference table? In this table, you have the new numbers of the appended records next to their old values. So if for some reason you need to know their old values, you can do a simple match.

Neil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top