Autonumber Error

  • Thread starter Thread starter Matthew Mark
  • Start date Start date
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.
 
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.
 
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
 
Back
Top