>Hi All:
>
>I have a form that has a label: 'Please swipe the Credit card or press escape'. It also has an edit box that has focus, so that when the credit card is swiped about 50 characters are entered.
>
>How do I execute a method when either: escape is pressed OR the characters have finished being entered from the swipe?
>
>Thanks,
>
>Yossi
Add code into the KeyPress event. A lot of keyboard wedge style scanners (barcode and CC) force a carriage return at the end of the string. You can intercept both the ESC or CR:
IF nKeyCode = 27
ENDIF
IF nKeyCode = 13
ENDIF
If the reader terminates with another character as Tracy mentioned, you can capture it here as well.