Hi Chuck,
As long as it works, is it so important to know why/how? <vbg> It is not necessary to pass the parameters back in, they are there already, to put it that way.
I use similar code frequently, for instance to change a comma into a decimal point, I do the following:
IF CHR(nKeyCode)=','
NODEFAULT
nKeyCode=ASC('.')
DODEFAULT()
ENDIF
I always put this code first in the keypress event, I think that is important.
>>Hi Steven,
>>
>>I have not read all messages in this thread, but in order to do what I think you want, you should do like this in the keypress event:
>>if nKeyCode=-6
>> NODEFAULT
>> nKeyCode=chr(176)
>> DODEFAULT()
>>endif
>>
>
>Off the subject a little but why does that work? I would assume you would have to do something like - which also works.
>
>
>IF nKeyCode = -6
> NODEFAULT
> nKeyCode = 176
> =DODEFAULT(nKeyCode, nShiftAltCtrl)
>ENDIF
>