How do I make sure info is capitalized when inputted?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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
 
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.
 
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top