First letter upper

G

Guest

This is a rather trivial point but I was wondering if there was a way to
format an input make to capitalize the first letter and leave the rest
untouched. I know I could program something in afterupdate like
upper(left(textbox,1))&mid(textbox,2,99) but I just want to use the mask
here. If I use the upper case symbol >, I am assuming the lower case symbol
will turn the rest of the string to lowercase. Not what I want. If the user
wants some upper case later on that should be allowed. So if I wanted to
enter conroy, PhD, the result should be Conroy, PhD, not Conroy, phd.
 
F

fredg

This is a rather trivial point but I was wondering if there was a way to
format an input make to capitalize the first letter and leave the rest
untouched. I know I could program something in afterupdate like
upper(left(textbox,1))&mid(textbox,2,99) but I just want to use the mask
here. If I use the upper case symbol >, I am assuming the lower case symbol
will turn the rest of the string to lowercase. Not what I want. If the user
wants some upper case later on that should be allowed. So if I wanted to
enter conroy, PhD, the result should be Conroy, PhD, not Conroy, phd.

If you wish to actually store the data this way, use code in the
control's AfterUpdate event:

Me![ControlName] = UCase(Left(Me![ControlName],1)) &
Mid(Me![ControlName],2)

No need to add the 99 in the Mid() function unless you do actually
wish to limit the characters to 99.
Mid([field],2) will return everything from position 2 on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top