开发者

access forms: forcing UCASE in a textbox

开发者 https://www.devze.com 2022-12-31 14:46 出处:网络
i would like to force the textbox to immediately change the text to UCASE a开发者_StackOverflow社区s soon as the user moves away from the field. is this possible?

i would like to force the textbox to immediately change the text to UCASE a开发者_StackOverflow社区s soon as the user moves away from the field. is this possible?

the important thing is that this text will be used in a SQL query to update a table.


In the after update event of the text box on the form, simply go:

If isnull(me.MyTextBox) = false then
   Me.MyTextBox = ucase(Me.MyTextbos)
End if

You can also specify a input mask on the form.

">LLLLLLLLL"

The above ">" will force all chars as you type to upper case. The number of L is a any char mask. (and, you don't need the " around the input mask)

0

精彩评论

暂无评论...
验证码 换一张
取 消