redzombi5k
Programmer
Hi guys,
I have come across a strange problem with the keypress event of an editbox.
I am tring to set up a hot key for 'Ctrl+S', and it appears to run properly, only after the code has run it places a '' in my edit box. After checking my code and finding nothnig wrong, I changed the nKeyCode to 18 'Ctrl+R' and ran it with absolutly no problem!
Can anyone else reproduce this, or have a suggestion?
my code is as follows...
DO CASE
CASE NKEYCODE = 4 && CTRL + D
THIS.Value = ALLTRIM(THIS.Value) + TRANSFORM(DATE())
CASE NKEYCODE = 19 && CTRL + S
THIS.Value = ALLTRIM(THIS.Value) + CHR(13) + 'No Signature on Soft Copy, Emailed Advisor' + IIF(THISFORM.TXTAdvNum.Value <> '', ' ' + ALLTRIM(THISFORM.TXTAdvNum.Value),'') + ' on - ' + TRANSFORM(DATE())
CASE NKEYCODE = 18 && CTRL + R
THIS.Value = ALLTRIM(THIS.Value) + CHR(13) + 'Need Rental Agreement - ' + TRANSFORM(DATE())
ENDCASE
Thanks!
I have come across a strange problem with the keypress event of an editbox.
I am tring to set up a hot key for 'Ctrl+S', and it appears to run properly, only after the code has run it places a '' in my edit box. After checking my code and finding nothnig wrong, I changed the nKeyCode to 18 'Ctrl+R' and ran it with absolutly no problem!
Can anyone else reproduce this, or have a suggestion?
my code is as follows...
DO CASE
CASE NKEYCODE = 4 && CTRL + D
THIS.Value = ALLTRIM(THIS.Value) + TRANSFORM(DATE())
CASE NKEYCODE = 19 && CTRL + S
THIS.Value = ALLTRIM(THIS.Value) + CHR(13) + 'No Signature on Soft Copy, Emailed Advisor' + IIF(THISFORM.TXTAdvNum.Value <> '', ' ' + ALLTRIM(THISFORM.TXTAdvNum.Value),'') + ' on - ' + TRANSFORM(DATE())
CASE NKEYCODE = 18 && CTRL + R
THIS.Value = ALLTRIM(THIS.Value) + CHR(13) + 'Need Rental Agreement - ' + TRANSFORM(DATE())
ENDCASE
Thanks!