Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to automatically update EWOID

Status
Not open for further replies.

hshaker

Technical User
Jun 29, 2007
66
CA
Hi there, I know that an auto number is a number that can increment by one everytime a new record is added. Let's say we have 100 records numbered from one to hundred. When we delete record #50, the auto number 50 will also be deleted. So we have record 49, 51 and so on. It makes sense that access should not automatically rearrange the auto numbers. But what if record 100 is deleted and there is no record after that. Now access should rearrange the numbers that so when the next record should be 100 instead of 101.

Can we overcome this problem?

Thanks a lot.
 
It is not a problem. Autonumber should not mean anything to you or your users. It is merely a field to keep the record unique. If the numbering of a particular field are important, you probably don't want to use Autonumber for that field. There are several other ways to get the highest number from a column and adding one to it (DMax, SELECT MAX, etc) and all have been demonstrated here several times. There are also several great posts/FAQs on why Autonumber should not be used in the manner in which you seem to be ready to use it. You might want to read a few of those as well.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top