Results 1 to 3 of 3

Thread: Employee ID

  1. #1
    Join Date
    Nov 2004
    Posts
    1

    Wink Unanswered: Employee ID

    I have an employee database and have always used the social security number as the Primary Key. I want to change the primary key to be a automatically generated "Employee ID". I am unsure how to have access automatically generate an employee id, based on the year of hire and the employees first and last initial. Please advise if you know how. Thank you!!

  2. #2
    Join Date
    Sep 2003
    Posts
    228
    You would have to concatenate three strings together, autonumber, hire date, first and last.

    Seems like you may want the autonumber to really be the primary key since the user normally isn't exposed to the primary key. Then you can build this Employee ID via the string functions and store it in the table as the Employee ID.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Unless you have an exceptionally good reason to use your proposed schema, I would say you're much better off using an aribtrary auto-number field here.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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