Input Mask vs. Format Property

M

Michael

Note: This was cross-posted in the tabledesign forum ......

Hi Folks - Just bumped into something interesting .... On a text field, I
can set the FORMAT property to > so that text entered will be formatted as
uppercase. The only thing I don't like about this technique is while you are
typing, the text is entered as lower case. It does not change to uppercase
until the field is updated. Now, if I use the Input Mask property, I can
force 2 uppercase text characters by setting the property to >LL. As I type,
the text is entered as Uppercase which I like. However, if I type a number
(incorrect type), Access only "beeps" instead of displaying a message
indicating that I am trying to enter the "wrong" kind of data. Any
workarounds? Thanks.
 
D

Dale Fye

You can set the forms "Key Preview" property to "Yes".

Then, in the KeyDown or KeyPress event of the textbox, you can test for
lower case characters and convert them to uppercase there. You can also test
for numeric and present an appropriate message.

HTH
 

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