I have a billing field that has a user enter an alpha number invoice
identifier and i would like to ensure that any entry in this field will be
large caps regardless if the end user keys in small caps. How is this done?
Damon Heron - 11 May 2007 20:01 GMT
In the Exit event of your textbox, put:
Me.Text0 = UCase(Text0) 'substituting the name of your textbox
>I have a billing field that has a user enter an alpha number invoice
> identifier and i would like to ensure that any entry in this field will be
> large caps regardless if the end user keys in small caps. How is this
> done?
Arvin Meyer [MVP] - 12 May 2007 20:21 GMT
In the AfterUpdate event of the textbox use:
Sub txtMyTextbox_AfterUpdate()
Me.txtMyTextbox = UCase(Me.txtMyTextbox)
End Sub
or
You can also use the KeyPress event to force the entry to upper case as it
is entered:
Sub txtMyTextbox_KeyPress(KeyAscii As Integer)
If KeyAscii >= 97 And KeyAscii <= 122 Then
KeyAscii = KeyAscii - 32
End If
End Sub

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
>I have a billing field that has a user enter an alpha number invoice
> identifier and i would like to ensure that any entry in this field will be
> large caps regardless if the end user keys in small caps. How is this
> done?