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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert all characters to uppercase in a field as they are entered

Status
Not open for further replies.

Terpsfan

Programmer
Dec 8, 2000
954
US
I have found this little code snippit to be quite handy for converting all letters to upper case as they are entered into the field. I like this one because it doesn't matter if the user has caps on or off.

Sub txtData_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(Ucase(Chr(KeyAscii)
End Sub
 
I missed a few parentheses, it should be:

Sub txtData_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(Ucase(Chr(KeyAscii)))
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top