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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autonumber assigning 'old' numbers

Status
Not open for further replies.

postmanphat

Technical User
Nov 13, 2006
117
GB
Hi,

I've got a data entry form for applications that has worked normally and perfectly for months. It has an autonumber field (autoid) that obviously increments sequentially in my data table (tbldata). However today, autonumber has started assigning exisitng numbers to new applications thus completely overwriting the exising info for that ID in the table (got backups so not a problem).

I've not changed the db in any way shape or form since yesterday and this happens -

The last autoid in my database is 1247. So my new application should be given the number 1248? But it actually gives it 1146, so I close the form and go to enter a new application again, but Access then gives it no. 1147. Again I'll close it and go to enter a new application then it assigns 1148 and so on.

I'm completely stumped - nothing has changed in the last 24 hours?!?!??!?!?

All help is as always most gratefully received.

Thanks

Dave
 
There are only 190ish records in the database, so I don't have a problem spotting where invalid autoIDs have been assigned. I really need to know why, and how to stop Access reassigning already taken numbers?
 
The article discusses causes, in what way does it not suit?
 
Did you compact and repair the DB ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Please do not post in more than one Access forum.

Also at: thread702-1493836
 
You should read that article.

What happens if you enter a record directly into the table without using the form?

--Lilliabeth
 
What happens if you enter a record directly into the table without using the form?"

It works fine, no problem.

"The article discusses causes, in what way does it not suit?"

None of the scenarios on there are really relevant to my problem...

"Did you compact and repair the DB ?"

Nope, but I'll try this now and let you know.

Thanks

 
What happens if you enter a record directly into the table without using the form?"

Actually, it doesn't work when I try this either. It still gives my new record an exisitng AutoID number.

I've also tried compact and repairing my db, but that had no effect either unfortunately
 
do you have ANY code / function etc. which references the field / control where the AN is stored / displayed? Please post ALL the relevant code.

(I'm assuming that there is some, as you know the AN before committing the record).




MichaelRed


 
Thanks to all those that ahve helped - I've got round the problem by getting the DB to re-create all the records that its already created, but without saving them. This has left all my currnet records intact, and now my next autonumber is correctly 1248. And following ANs are working correctly too.

Very strange indeed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top