If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access
How do you make all entries in a database field automatically capitalize the
entry? -- Thank you. |
#2
|
|||
|
|||
Access
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. -- TedMi |
#3
|
|||
|
|||
Access
On Sat, 29 Mar 2008 07:15:00 -0700, tedmi
wrote: 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) Afterupdate, actually - BeforeUpdate will trigger an inifinite loop since changing the value will call BeforeUpdate again. -- John W. Vinson [MVP] |
#4
|
|||
|
|||
Access
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)) ------------------------------------------------------------- Evan P.S I copied this code from the VB Help system "Judy at school" wrote in message ... How do you make all entries in a database field automatically capitalize the entry? -- Thank you. |
Thread Tools | |
Display Modes | |
|
|