How can I add the next consecutive letter?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • flower88
    New Member
    • Jun 2010
    • 22

    How can I add the next consecutive letter?

    Hello,

    I have a database that tracks revisions. A new record gets assigned letter "A" but if you want to make changes to the same record, that would be a new revision so you need to write the letter "B".

    I want the revision letter to be automaticaly assigned after I ask the user if they want to create a new revision. I created a true/false select case box or statement.

    My problem is that I do not know how to add the next consecutive letter to my textbox. I am new at this, but I tried doing the following where "revision" is the name of my textbox:

    me.revision= me.revision+1
    ---------
    me.revision= chr$(revision)+ 1
    ------
    me.revision=asc (revision)+1

    Clearly, none of the 3 ways I wrote this worked. They just look wrong.

    Can anyone help me?

    Thanks!
  • OldBirdman
    Contributor
    • Mar 2007
    • 675

    #2
    Code:
    Me.revision = Chr(Asc(revision) + 1))
    Last edited by OldBirdman; Jul 23 '10, 12:57 PM. Reason: Match OP syntax

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32656

      #3
      I assume you have a routine where you'd put this, but essentially the command is pretty much as OB has it :
      Code:
      Me.Revision = Chr(Asc(Me.Revision) + 1))

      Comment

      • flower88
        New Member
        • Jun 2010
        • 22

        #4
        OldBirdman thanks a lot! It worked. I was so close, but not really lol,

        thanks!

        Comment

        Working...