Assigning New Record ID's

Results 1 to 2 of 2

Thread: Assigning New Record ID's

  1. #1
    Join Date
    Dec 1969

    Default Assigning New Record ID's

    Hi,<BR><BR>I want to have a numeric field called incident_id in an Access database that identifies an incident record. This would be the primary key. Each time the user adds an incident report it will add it to the database and assign it a new incident number. Now if I was starting out fresh then I would just use the Access auto-number feature. But I have existing incidents I need to import into the database from another application. They need to keep their original incident_ id. <BR><BR>I’ve already tried getting the highest number from my database, reading it to a variable and incrementing that variable by one to get a new id. I’ve abandoned that approach for two reasons. One, it kept creating two records in my database for every one and I never could figure out why. See my question on this at the link below. <BR><BR><BR><BR>Two, I realized after reading some articles that this was a bad approach anyway since two users could end up with the same new record id. <BR><BR>What is the best way to handle a situation like this, creating a new incident_ id when I already have incident_id’s in the database?<BR><BR>Thanks for any suggestions. <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Assigning New Record ID's

    If they don&#039;t need to be incremental just set your starting number.

Posting Permissions

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