RI is still beating me...

Another thought, try putting:


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

In the KeyPress event for the field, that should only allow uppercase letters to be entered thus solving the problem at source.
 
Ian,
Tks greatly the KeyPress option works perfectly in the related field, since I'm the user and controller of these types of entries...its perfect!

However, if UCase and LCase work this way, what is the ProperCase equivalent code here, as I tried ProperCase and PCase for another field needing the same coding, or do I have to try your penultimate suggestion?

Tks great/greatly
 
if we are talking about keypress events there is no PCase event that will deal with the entry because the KeyAscii is simply the returned Ascii code from any keypress, it does not concern itself with whether it is the first, middle or last character entered, you may however try:

if Len(Me!TheField)>1 Then
KeyAscii = Asc(LCase(Chr(KeyAscii)))
Else
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End if

although I don't know how it will handle the event of deleting the characters. I'll leave that one with you.

Maybe also try:

Response = Add2Source("POSCODE228", "Poscode", strConv(NewData,vbProperCase))
 

Users who are viewing this thread

Back
Top Bottom