Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2007

Tip: Looking for answers? Try searching our database.

First letter upper

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Conroy - 08 Mar 2007 21:08 GMT
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.
Signature

Michael Conroy
Stamford, CT

fredg - 08 Mar 2007 21:43 GMT
> 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
[quoted text clipped - 4 lines]
> 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.

Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.