Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002

    Question Unanswered: Creating Unique IDs

    I apologize for not knowing much of the proper terminology. I am a long time computer user... but have never done any programing. I am working on my first database which is more than an address book.

    I am really having a hard time understanding table relationships. I also can't seem to get a grasp on queries. I know that both are CRITICAL.

    My specific question is as follows:
    Let's say I want the following fields in a table called MEMBERS.
    Member ID

    I can create a form to collect that info. But what I would really like is for the field Member ID to be created using data from the LastName, FirstName, and PhoneNumber fields.

    I can set up my form to even display the unique id that I want, but the id is not entered into the table. That is my problem.

    I want the id to be in this format:
    LL=1st 2 letters of LastName
    FF=1st 2 letters of FirstName
    NNNNN=Last 5 digits of Phone Number

    Like I mentioned, I can use the "Left" and "right" functions to display that info in a form... BUT that ID is not entered into my table.

    I know this is a simple question for most of you.
    Thanks for any help you can provide.

  2. #2
    Join Date
    Feb 2002
    You probably do not need an ID field, that is the one generated for you by Access. Instead replace this with a text field and call it MyID or something. Limit the length of the Text field to the maximum length you need for your ID code, and make your form update this field instead.

    You should probably set the allow duplicates to No in the field at table level. This would then qualify as the primary key for this table.

Posting Permissions

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