Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Beginner 3    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 

Richard Rost 

18 years ago
1LC, this is a common question I get all the time with regards to AutoNumbers. You put one record in and it comes up "1" and then some time later you add another one and it's "5". Why is this?

Well, somewhere along the line you inserted 2, 3, and 4, and then perhaps DELETED them. Access will NOT reassign them again. They're gone. That's why the next record is 5. You see, once an AutoNumber is used, it can NEVER* be reused. This is to maintain integrity in your database. Imagine if you added 5 customers, and each of them have orders in your system. Customer 2 dies so you delete his record (which you shouldn't do, but let's say you did). Now, you add another customer and he gets assigned ID 2. Well, he now just inherited all of the orders for the old dead customer because you forgot to delete all of those too - which, again, you shouldn't do... but this is just an example of WHY AutoNumbers aren't reused.

The good news is that it shouldn't matter. You see, the AutoNumber ID is not for you. It's for THE DATABASE to keep track of unique records. You'll use it later when you get into relating two tables together in my Access 201 class. If you want your OWN number to assign to customers for vanity purposes, then set up your own CustomerNumber system. Don't rely on the ID field. It's being assigned by Access, you just have to deal with the number you're given.

* Now, I should mention for the tech-geeks that read this, that YES you can make Access reassign some of the AutoNumbers with a compact and repair. This is way beyond my Access 101 students, but if let's say you have customers 1 through 5 in the database, and then you delete 3 thru 5 and you want to get 3,4, and 5 back as IDs. If you compact and repair your database, the next ID assigned should be 3. Again, you shouldn't worry too much about what IDs Access is assigning. They're not for YOU. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Beginner 3.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/8/2026 10:25:04 PM. PLT: 2s