Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

Inserting Value for Auto Incremement in MS Access 2002

I need to insert three records (including auto-increment) from an older database into a newer one that is exactly the same.
0
jtgraphic
Asked:
jtgraphic
  • 3
  • 2
1 Solution
 
Chuck WoodCommented:
Use an Append query without including the Autonumber field. The Autonumber field in the newer database will be automatically incremented.
0
 
jtgraphicAuthor Commented:
That's what I DON'T want to happen.  I have record 45678, 45679, and 456780, but the next increment is 87654.  Every time I insert them, it increments in the 80k range.  I'd like them to insert as their original key.  For the record.   The "new" database starts around 50k, so there wouldn't be a key overlap.

-JKT
0
 
Chuck WoodCommented:
You can try the Append query, including the Autonumber field. If that does not work, export the three records to Excel, including the Autonumber field, and import them into the new table.

Do you want the SQL for the Append query? If so, please post the names of the two tables.
0
 
jtgraphicAuthor Commented:

The two tables are both called "orders". I tried exporting the records, but don't know how it import and retain the original key. It just keeps appending it to the end.  Is it possible that it's a constraint somewhere in the database design?
0
 
Chuck WoodCommented:
Did you import it with the key field?
Did it ignore the key field and increment the Autonumber?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now