AutoNumber Options

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Coolboy55
    New Member
    • Jul 2007
    • 67

    AutoNumber Options

    I want to create an AutoNumber type field that uses prefixes. For instance, the Employee numbers would be E-1, E-2, E-3... and the Task numbers would be T-1, T-2, T-3...

    How can I accomplish this?

    Thanks!

    CB55
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Originally posted by Coolboy55
    I want to create an AutoNumber type field that uses prefixes. For instance, the Employee numbers would be E-1, E-2, E-3... and the Task numbers would be T-1, T-2, T-3...

    How can I accomplish this?

    Thanks!

    CB55
    Hi. Autonumbers are not the answer to your requirement, for two reasons. Firstly, your requirement is for a compound key (in this case a two-part key). Autonumbers are just numbers - automatically incremented, but still just numbers. Secondly, even if you create a two-part key with the second part an autonumber, it increments in record-added sequence and cannot be reset to 1 for each new prefix you add.

    Your compound key can be created using a combination of a character field and a Long, but the incrementing will need to be done programmaticall y or using SQL.

    -Stewart

    Comment

    Working...