To capitalize text already in a table:
UPDATE mytable SET myfield=StrConv(myfield, 3)
To capitalize text as it is being entered in a textbox on a form, put this
code in the BeforeUpdate event of the textbox:
MyTextBox=StrConv(MyTextBox, 3)
Look up the StrConv function in Access Help for more information about
string conversion possibilities.
To capitalize text as it is being entered in a textbox on a form, put this
code in the BeforeUpdate event of the textbox:
MyTextBox=StrConv(MyTextBox, 3)
If you want characters to captalize as you type, put the following code
behind the KeyPress event behind your textbox:
-----------------------------------------------------------
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))
Ask a Question
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.