Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making all letters CAPS

Status
Not open for further replies.

childlead

Technical User
Jul 13, 2001
21
0
0
US
Hi.

I want to code a textbox such that when a user enters a text, it is automatically stored in CAPS format. For example, when the user enters "apple", I want to code in such a way that it will be stored as "APPLE" in the tables. Thank you very much for your help.
 
Two options.

1)
In the text box Format property put ">"
This will allow users to type in lower & upper case but when the control loses the focus it all changes to UPPER case.
However, the data stored in the Bound field in the table is in the case As TyPeD.

2)
In the table design in the field you want to store the data in put the ">" in the Format property there.
The text is converted to UPPER case as the user types and is stored in UPPER case all the time.



'ope-that-'elps


G LS
 
Hadn't heard of those options before.

This is what I did with my db:

Code:
Private Sub fieldname_AfterUpdate()

    Me.fieldname.Value = StrConv(Me.fieldname.Value, vbUpperCase)

End Sub

So when the user hits enter or tab or whatever, the value is converted to uppercase.

Have fun!
Onwards,

Q-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top