473,507 Members | 2,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change ID numbering sequence

11 New Member
Hi

Is there a method of changing the auto numbering sequence whilst retaining the exisiting records along with thier original ID numbers?

What I am trying to say is, I have a table with records numbered 100000 to 100999 and I need to change the starting number to 200000 so the next set of records within the same table can be clearly seperated by thier starting number.

So, the last record entered will be numbered 100999 and the next new record would be 200000 whilst retaining the numbering structure of the original records.
Oct 12 '09 #1
4 5935
missinglinq
3,532 Recognized Expert Specialist
First question would be how are you accomplishing this "auto-numbering?" With an Access generated AutoNumber or with a custom coded generation routine?

Welcome to Bytes!

Linq ;0)>
Oct 12 '09 #2
NeoPa
32,557 Recognized Expert Moderator MVP
If you can specify logically what criteria would be used to determine how this should work, then it can be done. It would not be using AutoNumber fields though. It would not be automatically assigned. You'd need to introduce the assignment logic yourself in a form - with VBA code.
Oct 12 '09 #3
OldBirdman
675 Contributor
I did this in Access 2003 once by mistake. I was entering data directly into a table (creating test data), and somehow entered some data into the autonum field. Access accepted it and continued counting from that point, so I had an autonum field with 1,2,3,4,1062,1063,1064,...
I was never able to recreate this, as Access won't let me enter data into an autonum field. But is is somehow do-able.

You could append 99000 dummy records to your table, add a record, and delete the 99000 dummy records.

If you need to group records, you need another field in your table to do this. The Access autonum should be treated as if it were a random number (which is an option), and has no significance. If you use the random autonumbers, there is no entry order maintained, no holes when records are deleted. It promotes better programming because the programmer makes no assumptions about this field.

The autonum as a Primary Key serves 2 purposes: 1) It makes Access happy, and 2) it gives a field to link related data together. Any other use should be avoided.
Oct 16 '09 #4
NeoPa
32,557 Recognized Expert Moderator MVP
@OldBirdman
Absolutely. I concur fully.
Oct 16 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3068
by: Sjaak van Esdonk | last post by:
Is there a possibility to change the current collation sequence for all objects in a database ? I know it is possible to change the collation sequence of a database, but that only affects new...
5
4597
by: Charles McCaffery | last post by:
I have written a database with auto-numbering and now wish to remove alkl of my test data and set the auto-numbering back to one. How do I do this please? Charles McCaffery.
1
4796
by: Katie M | last post by:
I am working on a license program in Access 2000. Every year, the county assigns a block of numbers to be used. When someone applies for a license, they are assigned from that group. For...
1
1898
by: Wayne Aprato | last post by:
I have a report that shows the results of a query. One of the fields is an autonumber field from the query which shows for instance: 120, 121 , 122 for 3 records. Is there a way to have another...
2
2293
by: Wayne Aprato | last post by:
I posted this yesterday and it seems like a moderator has thrown it in another thread. This is a totally different question to the one asked in that thread, so I'm posting it again. It is not a...
3
2572
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table)...
1
2061
by: Thu | last post by:
Hi, I create a Dataset to link three tables in my Access database. E.g. The three tables are , , . I then create 2 DataRelations, 1st relation (Order_Cust_Rel) links and using CustomerID field...
1
2182
by: Marek Lewczuk | last post by:
Hello, I would like to ask if my problem with sequence is a proper behavior or this is a bug (probably not)... I have a table: CREATE TABLE "testtable" ( "serialfield" SERIAL,...
3
4677
by: kevin | last post by:
Is that even possible? I am creating a web service in .NET to expose some already created .NET programs to other groups. One group is writing the client in PERL, and thus wishes the wsdl schema...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7111
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.