Put the following procedure in any standard module in your database:
Public Sub ConvertToCaps(KeyAscii As Integer)
' Converts text typed into control to upper case
Dim strCharacter As String
' Convert ANSI value to character string.
strCharacter = Chr(KeyAscii)
' Convert character to upper case, then to ANSI value.
KeyAscii = Asc(UCase(strCharacter))
End Sub
and in the KeyPress event procedure of any control call it with:
I also might suggest reviewing the "StrConv" function. Use the help file to
get more specifics.
This does not necessarily solve your immediate problem. However, if you ever
need to make some conversions to proper casing, Access can handle that too.
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.