Auto Number Formatting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AllusiveKitten
    New Member
    • Feb 2007
    • 43

    Auto Number Formatting

    Hi All

    I have just come up with an issue that requires a formatted auto number ie QSTR001, QSTR002 etc, is it possible for this field to be directly put into the access table as an auto number?

    Or do I have to Conconate it in the Report? With the QSTR & "#"

    If I do have to conconate it, how do I code a single digit such as 1 to be shown as 001?

    Thank again for you help
    AK
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by AllusiveKitten
    Hi All

    I have just come up with an issue that requires a formatted auto number ie QSTR001, QSTR002 etc, is it possible for this field to be directly put into the access table as an auto number?

    Or do I have to Conconate it in the Report? With the QSTR & "#"

    If I do have to conconate it, how do I code a single digit such as 1 to be shown as 001?

    Thank again for you help
    AK
    You can store the next Formatted Number in sequence directly in the Table, but it cannot be an AutoNumber. It must be stored as Text and should probably be the Primary Key. The Formula would be
    [CODE=vb]"QSTR" & Format$(Val(Rig ht$(DLast("[Your_Field]", "tblYour_Table" ), 3))+1,"000")[/CODE]

    Comment

    • AllusiveKitten
      New Member
      • Feb 2007
      • 43

      #3
      Thank you ADezzi
      Your a great help.
      AK

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        Originally posted by AllusiveKitten
        Thank you ADezzi
        Your a great help.
        AK
        Always glad to help AK. Please don't mind the Shortcut, it's a little easier than typing AllusiveKitten (LOL).

        Comment

        • AllusiveKitten
          New Member
          • Feb 2007
          • 43

          #5
          Originally posted by ADezii
          Always glad to help AK. Please don't mind the Shortcut, it's a little easier than typing AllusiveKitten (LOL).
          I understand what you mean, why do you think I only type AK.....lol, I am just as lazy.....hehe

          Comment

          Working...