Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Increment letter (2003 SP3)

    Hi All,
    I would like to increment a letter on a form when a new revision of the item is created. The value I am putting together is 123456-A, where "A" is the revision number. If the user would like to create a new document, the next item would be called "B". I understand how to make the code increment a number but how can you do this with letters?

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Increment letter (2003 SP3)

    Say the field is named Revision.
    You could update the value to

    Left([Revision], Len([Revision]) - 1) & Chr(Asc(Right([Revision], 1)) + 1)

    When you've reached 123456-Z, it will continue with 123456-[ etc.

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Increment letter (2003 SP3)

    Thanks Hans, works!

Posting Permissions

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