Before you call your function, set KEYASCII = 0 - you've already trapped the action and done your business - I think leaving the KEYPRESS event with KEYASCII having a 13 value could be the problem.