Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    90

    Unanswered: Autonumber ID Column Suggestions

    I have an access database I am converting to Access. The old database didn't have an Autonumber field, the application would handle calculating the next ID value (basically the next ID value would be stored in a table and this would be read and incremented when a new record was added).

    The users have been working with these Customer ID numbers and they are in many of their documents, etc... so these values must stay the same as they were.

    I want to add an Autonumber field to the database so I dont have to worry about the updating of the customerID and to get rid of concurrency issues with the update process.

    What is the best way to go about doing this?

    Currenty I have two columns: "AutoNumber_CustomerID" (the new column I added) and "Customer_ID" (the old column). When I add a record I manually calculate what the next "CustomerID" value is.

    Is there a better way to do this?

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    I believe you can do a "SELECT INTO" to get autonumbers initially populated with existing data
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Jul 2004
    Location
    Southampton, UK
    Posts
    368
    Check out a couple of options in this thread here

    One is creating a new sequential number by code (I think - I haven't checked), and the other is my solution for forcing the autonumber to carry on where it left off (accounting for any deleted records where you want to avoid re-using deleted IDs).

    hth
    Chris

  4. #4
    Join Date
    May 2004
    Posts
    90
    thanks, that should work

Posting Permissions

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