Autonumber Error

M

Matthew Mark

Wow, sounds really weird. As you suspected, I'd go for
corrupt table and....

Why don't you create a new table. Then using an Append
query to insert the records from the old table to the new
one, except the Autonumber column. See if the corruption
was directly related to that table. Also, on your existing
table, though it shouldn't be necessary, make sure the
column is set for No duplicates allowed.
 
K

K*2

Thanks for the response, Matthew. The problem with
creating a new table is that the one in question is
related to two others and the ID number is link between
them. If I change the ID, it would make the data in the
related tables useless. On the other hand, if there's no
other solution, we'd have to find a way to work around it.
 
K

Kevin

When you query the existing data to put it into the new
table, try doing the query in two parts, the first query
would be a select query where you would sort on the id
field. The second query would be based on the select
query and would be the append query. This query would not
include the id field. When the records are appended to
the new table, they will be appended in order. The
autonumber field will then assign the new id number in
turn. I suspect if you do this that the records in the
new table will be the correct ids.

Hope this helps!

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top