How to create sequential numbers in table.

vaibhav2015

Registered User.
Local time
Today, 16:29
Joined
Sep 15, 2015
Messages
25
Hi,
I have created table with column "ID" as auto number. In Auto number I have seen some row numbers are missing.
I want to create one column to get correct sequence of row.

Example: I have created table and Form for employee details. If I enter Employee number in Form, sequence number must be created automatically.

Can you please guide me how I can create sequential number?

Thanks,
 
An AutoNumber is only guaranteed to be unique, they are generated in sequence but if you delete a record it won't magically renumber the whole thing for you and you wouldn't want it to as it would break everything that the ID related to.

Does it really matter if there is a number missing from the sequence? If it doesn't then you will make your life a great deal easier, by just accepting that there may be some gaps in the numbers.
Edit. Also call it EmployeeID not just ID - you'll get confused later by having 20 fields all called ID in different tables.
 
Further to the comments by Allan and Minty, I suggest you read this article concerning Autonumbers -What they are not and what they are.

Also, I recommend you review some tutorials on database concepts and design . In my view you define a business problem and develop a solution. I don't think you start with building a table in isolation,(no business context). Perhaps I am misunderstanding your statement, but it would be helpful to you and readers if you told us about the business facts involved.

There are many good tutorials at RogersAccessLibrary.

There are 2 youtube tutorial series that may be useful to you.

1)Database concepts and design by Dr. Daniel Soper starts here
2)Programming with MSAccess by Steve Bishop starts here

Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom