Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

Strings: Convert all text to Upper/Lower case

Author(s)
Dev Ashish

(Q) How can I convert all text in a control to all Upper/Lower case automatically?

(A) You can either use Input Masks for the control to make sure the users only type in all proper case or you can convert whatever was typed to the required case using the Lcase or Ucase functions. For example:

'******************* Code Start ****************
Sub someControl_AfterUpdate()
    Me!someControl = Ucase(me!SomeControl)
        ' OR
        ' me!SomeControl = Lcase(me!SomeControl)
End Sub
'******************* Code End ****************

This code snippet will automatically convert all strings in the control SomeControl in the current form to the required case.


© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer