Input Mask vs. Format Property

  • Thread starter Thread starter Michael
  • Start date Start date
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.
 
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
 
Back
Top