Topics Search

Restart auto number after deleting records

Restart auto number after deleting records
Views: 68
If I delete a record using a query, is there a way to restart auto number to start at 1 and increase in consecutive integers, or is that just going to cause issues with the data?

The autonumber is my primary key and doesn't really have anything to do with the other data in the table (i.e. I don't care if the auto number changes on a record, provided the other data doesn't change).
Sponsored Links:

Similar posts...


Appending Records with a desired auto number in a table with Auto Number

Appending Records with a desired auto number in a table with Auto Number Icon
Here is my issue. In a table with an Auto Number index some records have been deleted. I have been able to recreate them along with their original auto number. The problem is that I do not know how to append these records forcing the original auto number. I have tried changing the auto number field to a number field in the table, this works except I cannot change it back to auto number.

I am sure Im not the first with this question or issue. I did search through a couple hundred entries about auto number before I posted this question

Combobox inserts new records to my querry

Combobox inserts new records to my querry Icon
I built up a subform in a form which contains a combobox (ranking) to choose different records (good [auto-number 1], bad [auto-number 2], unknown [auto-number 3]).
In the property sheet I chose Limit To List "Yes".
I can only add the words good, bad or unknown, which was my goal. But access creates new records into my querry. When I chose unknown it saves unknown [auto-number 4]. So the next time I can choose between good [auto-number 1], bad [auto-number 2], unknown [auto-number 3] and unknown [auto-number 4].
Therefore I save the information but I cannot use it in the end because every record has a different auto-number.
Can someone please help me, I already spend 6h try and research on the internet but I could not find an answer

Question about auto numbering

Question about auto numbering Icon
I have an access database that's published to sharePoint services. The database contains one table. We used Microsoft's 'Assets Database' Template to initially set it up. I've changed quite a bit around in the template to make it fit our needs, and things seem to be coming along just fine for the most part.

We used auto numbering for each record, the auto number is the first field in the database ( I believe this is my primary key as well). when a user deletes a record - say record 4 for example - the database does not renumber the records it just shows the records in order as 1, 2, 3, , 5, 6, etc. skipping number 4. So this puts my users in a position where they have no idea how many actual records are in the database.

Is there a way to have access re-number the records? I assumed when I setup auto numbering for column 1 that it would do this.

Auto fill data (number) between tables

Auto fill data (number) between tables Icon
I created a database to track a group of records (people). I couldn't figure out how to auto number the primary key to a random unique number that was less than 10 digits so I generated a list of random numbers and just use the next number off the list as I enter the next person which works OK- but I have to put that number on each table as the ID number to relate back to the Primary key and it seems that I should be able to have those auto fill with the entered number. Is it possible to have the number typed in "table 1" (people) primary key auto fill onto each of the other tables as an ID number?

Can I Re-set an auto number field ?

Can I Re-set an auto number field ? Icon
Have copied one of my databases, re-named it and deleted all records. I want it for another purpose but in terms of fields, design and reports it is just what I need.

However - I have an auto field - record number - this obviously remains at the number of the last record in the (deleted) database.

Can I re-set the numerical origin of this field to start again at one ? Or do I have to delete it and set up another auto record number field ?

This is not an urgent enquiry - probably a bit basic for many on the forum - but just to add to my knowledge of Access.

Deleting duplicate records

Deleting duplicate records Icon
I have a table: [Related Submissions]
Fields: Autonumber (Primary key), [SUbmission Number 1], [Submission Number 2], Relationship
Using Access 2002

I want to remove duplicate records where for two records, [Submission number 1], Submission Number 2] and Relationship are the same. It is easy to find the duplicates, but is there any wayto remove one of the duplicate records?

Identity specification in sql server

Identity specification in sql server Icon
I am new to sql server.I have a table with id as auto I have records from 1,2.100.Now I am deleting last 10 records 90 to 100. So now I have 90 records.

Next time if I enter a record I want the is to be 91.but its as 101.

Deleting records from multiple tables

Deleting records from multiple tables Icon
I am deleting records from multipletables but it doesn't work for me. [SQL CODE]:

Auto Number in Access Query

Auto Number in Access Query Icon
I need to have an auto number in an access query, this is not the auto number already existing in the table. I need a separate auto number field in the query which begins with 1 and is in increasing order.

Auto generate reference number

Auto generate reference number Icon
I have a question about the auto-generate number feature in access tables.

I want to paste records that have unique reference numbers from an excel sheet into my access data table.

However when I do this Access changes the reference numbers as the relevant column in the table automatically generates a number series.

Is there any way of turning off this auto generate feature