Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2017
    Posts
    1

    Smile Answered: Unique ID based on another ID

    Hello,

    I'm still new to databases (I did a little database in college but i didn't pursue) and I'm here constructing one at the moment, but I was wondering if it was possible to do something like this:

    We have employees, and they're in different departments. I want to give each department a unique ID (A - T) and then give each employee a unique number based on their first ID automatically (upon entering a new employee)

    For example:
    Our first employee in A would be A01
    Second employee would be A02
    First employee in B would be B01
    etc.

    Is this possible in Access? What would be the procedure to have this done?

    Thanks for all your help!
    -Nell

  2. Best Answer
    Posted by ranman256

    "You are creating work you don't need.
    The autoNum ID field will create the computer ID needed for the db.

    YOUR ID can be made via a query =left([dept],1) & [id]
    This is all that's needed. Or If you have company assigned IDs, you can make a field to enter them. This is for humans only.

    Don't make more work for yourself trying to make the db use these human iD's work in the internal linking.
    Just use the autoNum."


  3. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    629
    Provided Answers: 33
    You are creating work you don't need.
    The autoNum ID field will create the computer ID needed for the db.

    YOUR ID can be made via a query =left([dept],1) & [id]
    This is all that's needed. Or If you have company assigned IDs, you can make a field to enter them. This is for humans only.

    Don't make more work for yourself trying to make the db use these human iD's work in the internal linking.
    Just use the autoNum.

Posting Permissions

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