
| |
AVOID
AUTONUMBER CONFLICTS
One way to copy or move
data from one table to another is to run an Append query. However, if both
tables contain AutoNumber fields, you could end up with duplicate AutoNumber
values in the target table (the table to which you're appending data). If you
include the source table's AutoNumber field in the query, Access copies those
values to the target table during the Append query process. If those values
already exist in the target table, you'll end up with duplicate values in your
AutoNumber field.
If your source table doesn't have any relationships
based on the AutoNumber field, you can avoid this problem. Simply delete the
AutoNumber field in the source table, then append it. The target table creates
a new AutoNumber value for each of the appended records. Once you've appended
the records, you can add another AutoNumber field to the source table. Just be
sure there are no indexes set in your source table before deleting the
AutoNumber field. An index might cause your records to sort again, and you'll
have a difficult time reassigning the appropriate AutoNumber values to each
record. In addition, you won't be able to use the newly numbered records in the
target table in any expressions or functions that rely on the source table's
original values
last updated: Monday, 24. May 1999 09:47:09 -0500
|