Action after enter key on a text field

Hi Folks,
I am tinkering again with a small project. I have a textfield where you enter a string of text, say 98AB and hit enter, then the app would do ‘X’ processes. I have tried using the TextChange Event Handler, but when you enter the first character 9 from above, it then starts the action instead of waiting for the entire string 98AB to be entered. I also tried the LostFocus Event Handler and tabbing away, but that did not work…

[code]dim text1 as string

text1.text = textfield.text

‘Do "X’ command[/code]

Is there a way to do this?

In keydown event…

If key = chr(13) or key = chr(3) then //do whatever Return true Else Return false End If

Thank you Roger, this worked perfectly.

Thank you! This solved my question too… :wink: