|
This tip, Forcing Uppercase, will explain how to
force a user to enter uppercase values into a form, whether they do so or not
from the key board.
Over the time of using Microsoft Access this query often
comes up, as it did for me. I tried numerous options but none of them were
satisfactory. This solution is the best I have come up with.
Use the 'Key Press' event for
each field and add the following code between the two lines of code created:
KeyAscii =
Asc(UCase(Chr(KeyAscii)))
To create the 'Key Press'
event, right-click on the field, select properties from the drop-down list and
click on the event tab.
Scroll right to the bottom to
find the 'Key Press' event, place your cursor next to this event and click on
the '...' button that should now appear
Click on ‘Code Builder’ and
OK.
This will open the VBE window
with your cursor between two lines of code that have been created (as per below
or similar):
|