uppercase Inputmask

M

mlu

When defining a field with an inpumask to uppercase the entry, do we
have to always repeat the letter length time following the > to force
all letter to be capitalize. There must be a simple mask to do the same
job.

ex. to uppercase every letter from a 10 characters text field i do:
CCCCCCCCCC

is there something like the following to do the same job:

Thank You!
 
D

Duane Hookom

I detest input masks and can't remember the last time that I used one. I
would add code to the after update event of the text box like:

Me.txtLastName = StrConv(Me.txtLastName, vbProperCase)

Substitute your control name above. This code would change
johnson to Johnson
PETERSON to Peterson
McKinley to Mckinley
de Salle to De Salle
 
J

John Vinson

When defining a field with an inpumask to uppercase the entry, do we
have to always repeat the letter length time following the > to force
all letter to be capitalize. There must be a simple mask to do the same
job.

ex. to uppercase every letter from a 10 characters text field i do:


is there something like the following to do the same job:


Thank You!

An input mask of

will *display* the value in all upper case. However, what's actually
*stored in the table* will be the value as typed - that is, you'll see
PIZZA but it might actually be stored in the table as piZZa.

If you want to actually convert the data to upper case as it's typed
in, you must use a Form with code to do the conversion. Use the
textbox's AfterUpdate event for example:

Private Sub txtMyTextbox_AfterUpdate()
Me!txtMyTextbox = UCase(Me!txtMyTextbox)
End Sub

John W. Vinson[MVP]
 
M

mlu

Thank you John and Duane,

But we are not using access Forms and a value can be insert from other
product like msquery, SQL*Forms or SQL*Plus. So, the mask must be use
for my case.
 
D

Duane Hookom

Are you sure that any of those other applications support Access input
masks? I can't image msquery supporting input masks.
 

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

Top