Is it possible to restrict somebody so he or she can only input uppercase data or convert the data in this field to uppercase. The length of the string is variable so a input mask isn't usefull.
You can force the text to upper case at the form level by using the ">" (no quotes) in the format property for the text box that users are entering data into.
When using the ">" U must add a number of "&" or whatever to it but that's exactely the problem. The length of the string cannot be fixed. The user has to be able to give in a string of 3 characters, 5 characters, 10 characters,... BUT!!!! only in uppercase.
Hi, try this in the On Current event of your form. It makes use the the Tag Property found under the 'Other' tab of your control's properties. It is useful in including and excluding controls.
Private Sub Form_Current()
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Then
'if tag value = 1 then use Ucase
If ctl.Tag = 1 Then
ctl.Value = UCase(ctl.Value)
End If
End If
Next ctl
use ">" (no quotes). but instead of using it on the textbox of the form, define it directly on the table the field is. You don't have to define a number of characters after the ">
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.