Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   Courses   Seminars   Templates   Help   TechHelp   Forums   Contact   Join   Order   Logon  
Home > TechHelp > Directory > Access > Deleted AutoNumber < Custom Sort | Sequential Number >
Restore Deleted AutoNumber
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   14 months ago

Restore AutoNumbers for Deleted Records

 S  M  L  XL  FS  Join Now

In this Microsoft Access tutorial, you will learn how to restore AutoNumbers for records that have been deleted. Whether you accidentally deleted them, or the records became corrupted, you may need to get their IDs back. This video will show you how.

Samantha asks, "I’m in tears. I accidentally deleted a customer. I have a backup and can add his record to the table, but he gets a new AutoNumber. Is there a way to restore his old Customer ID so I don’t have to re-enter ALL of his orders, contacts, etc."


I'll show you how to restore a bunch of records from a backup table, how to write SQL and VBA to automate the process, how to increment your "final" AutoNumber, and we'll see how to use Referential Integrity to prevent accidental deletion in the future.

Silver Members and up get access to an Extended Cut of this video. Gold Members can download the database template from class plus get access to the Code Vault. If you signed up on YouTube you have to contact me so I can set up your account here on my web site. If you're not a member, Join Today!


Learn More

FREE Access Beginner Level 1
Access Level 2 for $1.00

Free Templates

TechHelp Free Templates
Blank Template
Contact Management
Order Entry & Invoicing
More Access Templates


Mailing List - Get Emails When New Videos Released!
Consulting - Need Help with Your Database?


Please feel free to post your questions or comments below or submit them via the TechHelp page.


Dont Rely On This Upload Images   Link 
Richard Rost 
14 months ago
There's a reason I haven't taught this in my classes so far, and that I always teach you that AutoNumbers can't be reused. You shouldn't do it! Use this technique as a last resort if you are recovering from an accident. Don't build your database with being able to reuse AutoNumbers in mind. It's not reliable.
7 months ago
Thank you for all your help with the Access Tech Help videos; they are all great & appreciated. 2 questions on the extended cut video for Restore AutoNumbers for Deleted Records. 1 -- I use cascade updates because if an employee has a name change it will update that info in all the records they have generated. (I never use cascade delete.)  2 -- Why did we delete "8" as the next Autonumber when we fixed the database? Wouldn't you want to use that number & no lose it?
Richard Rost
7 months ago
1. You shouldn't have to cascade update the employee's name because their NAME shouldn't be stored in any other tables UNLESS you want to track the history of their name changes. In that case you wouldn't want them to cascade delete. You make relationships with IDs. Not names. Cascade updates are unnecessary here.

2. No reason. One of the points of the video is that AutoNumbers are MEANINGLESS to you, the user. Only Access cares about them.
Add a Reply

Start a NEW Conversation
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.

You may want to read these articles from the 599CD News:

10/17/2021Date Only?
10/16/2021Relink Tables
10/16/2021Access Developer 34
10/16/2021Access Developer 34 Lessons
10/16/2021Access Developer 34
10/10/2021Copy Text from Field
10/10/2021Access for Free
10/8/2021Label Resize
10/2/2021Criticisms of Access

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Account Login
Online Theater
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: TechHelp Access Replace AutoNumbers Restore AutoNumbers Deleted AutoNumbers  PermaLink