Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UCase not working 1

Status
Not open for further replies.

wx5chr

Technical User
Jan 21, 2004
31
US
I have a field (ST) in the main form. Pressing TAB from this field puts the focus into a subform.

I want to ensure the state abbreviation is uppercase, so I tried all of the following in the OnLostFocus Event:

UCase (Me.ST)
UCase Me.ST
UCase ("[Me.ST]")

Any ideas why none of these work?
 
The syntax should be:

me.st = ucase(me.st)

But, why not use an input mask to force uppercase - >LL

This will not only force upper case, but will insure that only alpha characters are entered.

Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
The UCase is fine but you need to do the assignment back to the control like this -

Me.ST = UCase(Me.ST)


Hope this helps you,

Steve
 
try this on press key event:

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

have a good luck!
 
Thanks very much for the quick replies. I decided to use > in the format.
 
gasx;
I love that OnPressKey trick!
Thanks for sharing!
LJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top