UCase problem

Luka

Registered User.
Local time
Today, 01:21
Joined
Oct 29, 2004
Messages
40
Hi,

I'm using code which convertes names of costumer into upper case when user type the name into control. But there is a problem.

If letters č,š,ž are pressed they are not converted to upper case.

Code:

Private Sub Customer_KeyPress(KeyAscii As Integer)
On Error Resume Next

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

End Sub

please help
 
There is one other way to do this, but I'm affraid that it will not work if your way don't. I'll tell you anyway just in case in might work.
You could put «>» in the InputMask property.

I hope it works! Good luck!
 
I' m not using input mask. This code worked just fine in access 2000 version.

Anyway I debuged it and found out that Keyascii produce <Out of context> value. I don't know why but this is the problem.

Thanks for reply

If anyone gets any idea, please reply
 
Solution

If anyone have the same problem here is solution

Add watch to Keyascii and see what number is displayed as value. Then set that number to other number which shows the same letter just upper case. Or any other number if you wish to transform this letter to any other.

Example:

Private Sub Customer_KeyPress(KeyAscii As Integer)

If Keyascii = 381 Then
Keyascii = 382
Else
Keyascii = Asc(Ucase(Chr(Keyascii)
EndIf

End Sub

Thanks for your reply Newman. :cool:
 

Users who are viewing this thread

Back
Top Bottom