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

message from jen on 12 May 2004
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
 
Jim/Chris replied to jen on 12 May 2004
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
 
jen replied to Jim/Chris on 12 May 2004
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
be
a
in
 
John Vinson replied to jen on 12 May 2004
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?

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
 
JohnC replied to jen on 1 Jun 2004
In the On Key Press event of the text box, enter:

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

...johnc

"jen" <anonymous@discussions.microsoft.com> wrote in message
news:c3b001c43851$630f25a0$a301280a@phx.gbl...
 

Archived message: upcase and cursor at the first position in a text box. (MS Access Error Message)