How do I make sure info is capitalized when inputted?

S

Steve Schapel

Jerry,

You mean all capitals? On the After Update event of the textbox on your
form, put code the equivalent of this...
Me.NameOfYourTextbox = UCase(Me.NameOfYourTextbox)

--
Steve Schapel, Microsoft Access MVP


Jerry wrote:
nothing at all
 
J

Jerry

Dorian,
I am new to access and what to avoid using VB. Isn't there a parameter
within an access table that makes sure all info inputted into a form is
uppercase?
Thanks
 
J

Jackie L

Jerry,

You can set your input mask on the field to be
L?????????

but you have to make sure that the number of characters corresponds with
your text field size.

The example above is at least one character and up to 10 with all being
convertaed to upper.

See Examples of Input Masks in the Help for more info.

Hope this helps.
Jackie
 
J

Jerry

great, thanks
--
Jerry Schutt


Jackie L said:
Jerry,

You can set your input mask on the field to be

but you have to make sure that the number of characters corresponds with
your text field size.

The example above is at least one character and up to 10 with all being
convertaed to upper.

See Examples of Input Masks in the Help for more info.

Hope this helps.
Jackie
 
S

Steve Schapel

Jerry,

Why do you want to avoid using VBA? In this case (no pun intended), the
VBA code required is one very simple line, as shown in my earlier post.
Jackie's suggestion of the Input Mask will work, but is more difficult
and problematic than the VBA idea. The other option is to use a macro.
Make a new macro, enter a SetValue action, and set the arguments of
the macro as follows (substituting the actual name of your field of
course)...
Item: [NameOfYourField]
Expression: StrConv([NameOfYourField],1)
Close and save this macro, and then assign it on the After Update event
property of the textbox on your form.
 
D

DaGoon

Steve,

I am looking to do something similar but I would only like to
capitalize the first letter in each word of a field. I'm assuming I
can do it as follows:

Me.NameOfYourTextbox = Proper(Me.NameOfYourTextbox)

Bob
 
S

Steve Schapel

Bob,

As far as I know, there is no such thing as a Proper() function. You
can use the StrConv() function, like this...
Me.NameOfYourTextbox = StrConv(Me.NameOfYourTextbox, 3)
 
Top