upcase and cursor at the first position in a text box.

  • Thread starter Thread starter jen
  • Start date Start date
J

jen

Hi,
Can anyone tell me how to do the following:?

1. Whatever characters(either upcase or lowcase) a user
types in a text box on a form, all the characters will be
CAPITALIZED simultaneously in the test box on the form
once the user enters.

2. Any time a user put his/her cursor to a text box on a
form, the cursor is always at the very first position in
a text box before the user enters in any data.

Any help will be greatly appreciated!!!
thank,jen
 
1. Put this in the after update event of the field
Fieldname = UCase(FieldName)

2. Put this in the ON Enter event
Me!fieldname.SelStart = Me!fieldname.SelStart

Jim
 
Hi Jim,
Thanks for your suggestions.
I tried the UCase function on after update event, but
nothing changed, and I tried Me!fieldname.SelStart = Me!
fieldname.SelStart , I got compile error: Invalid use of
property. Is there any more suggestions?
Thanks for your help.
jen
 
Hi Jim,
Thanks for your suggestions.
I tried the UCase function on after update event, but
nothing changed, and I tried Me!fieldname.SelStart = Me!
fieldname.SelStart , I got compile error: Invalid use of
property. Is there any more suggestions?
Thanks for your help.

Please post the actual code. The Event property should show [Event
Procedure] - are you perhaps trying to put the code directly on the
event line, instead of invoking the Code Builder?
 
To get all uppercase in a text box:
In the On Key Press event of the text box, enter:

KeyAscii = Asc(UCase(Chr(KeyAscii)))



....johnc
 
Back
Top