By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

How can I add the next consecutive letter?

P: 22
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!
Jul 23 '10 #1

✓ answered by OldBirdman

Expand|Select|Wrap|Line Numbers
  1. Me.revision = Chr(Asc(revision) + 1))

Share this Question
Share on Google+
3 Replies


100+
P: 675
Expand|Select|Wrap|Line Numbers
  1. Me.revision = Chr(Asc(revision) + 1))
Jul 23 '10 #2

NeoPa
Expert Mod 15k+
P: 31,768
I assume you have a routine where you'd put this, but essentially the command is pretty much as OB has it :
Expand|Select|Wrap|Line Numbers
  1. Me.Revision = Chr(Asc(Me.Revision) + 1))
Jul 23 '10 #3

P: 22
OldBirdman thanks a lot! It worked. I was so close, but not really lol,

thanks!
Jul 23 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.