Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006
    Posts
    30

    Unanswered: Append Query and Autonumber Field

    Hi,

    I am new to Access and have a fairly straightforward electronic parts database running. I am in the process of entering hundreds of parts into the database. I may be able to get help in this process. I envision making a copy of the database, but with the "parts" table cleared of all entries. My helper would then be entering parts in the new database while I am working on a different set of parts in the original database. I plan to design an append query to combine my helper's entries with mine. I think I can design the query using Access help, but I am wondering about the PartID field which is an autonumber field. My helper's PartID would start with 1 and increment from there, while the same field in my database would have PartID numbers that would be duplicates of those in the new database.

    Since I haven't tried this yet, I don't know how Access would handle it. Can someone help me with this?

    Charles

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    When you append the data that is in the database copy into the "main" database, they will get new PartID's assigned to them. You can't append
    data into an autonumber field, so you won't append your helper's PartID's...
    rather, the system will generate new ones when you append all of the other data.
    Inspiration Through Fermentation

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by RedNeckGeek
    You can't append data into an autonumber field
    sure you can
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154
    why not leave the entries in the new database (ie import them) so that continuations can be inputted form the last entry in old db?

    Alternatively, why not create the autonumber to have a prefix in the new db, ie 99???? that way, you know that all the 6 digit entries starting 99 are the new entries, and those that don't are the olds ones?

    Just a thought,

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

  5. #5
    Join Date
    May 2006
    Posts
    30
    Thanks for all of the replies. I confess I do not understand Dan's first suggestion:

    ...why not leave the entries in the new database (ie import them) so that continuations can be inputted form the last entry in old db?
    I am going to try a straightfoward append query as suggested by RedNeckGeek and let the system handle the autonumbering.

    Charles

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •