SHORTCUT FOR AN INPUT MASK?

G

Guest

I want all the text to appear in a field in upper case. I can use ">C" in the
input mask option but for a field of 50 siza do I have to insert "C" 50
times? Can't there be a shortcut?
 
G

Guest

Hi Faraz

I wouldn't use an input mask. Input masks do not stop your users from
storeing lower case so if its important don't use them.

I have used the on KeyPress event to change the lower to upercase in some
address fields in some of my DB's.

Private Sub ControlName_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

Note - change ControlName to the name of your text box


Or you could use the afterupdate like this

Private Sub ControlName_AfterUpdate()
Me!ControlName = UCase([State])
End Sub

Note - same as above - change the controlname


Good luck
 
G

Guest

ooops - should be


Private Sub ControlName_AfterUpdate()
Me!ControlName = UCase([ControlName])
End Sub
 
G

Guest

Thanx Wayne,

Shall try it soon enough when I am at the stage of preparing forms.
Currently I am only at the Table and Database structure designing level.

Wayne-I-M said:
ooops - should be


Private Sub ControlName_AfterUpdate()
Me!ControlName = UCase([ControlName])
End Sub

--
Wayne
Manchester, England.



FARAZ QURESHI said:
I want all the text to appear in a field in upper case. I can use ">C" in the
input mask option but for a field of 50 siza do I have to insert "C" 50
times? Can't there be a shortcut?
 
J

John W. Vinson

I want all the text to appear in a field in upper case. I can use ">C" in the
input mask option but for a field of 50 siza do I have to insert "C" 50
times? Can't there be a shortcut?
Yes.

as a mask.

John W. Vinson [MVP]
 
J

JanetS

Instead of using an input mask - just put the greater than sign (the >
symbol) in the FORMAT property. That way - no matter how the user types the
names - they show up (in all tables, forms, query results, reports, etc) in
all uppercase.
 

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