>That would work, but do you need the validation code to run if the user uses the mouse to click to another control? Also, you may want to include the tab key in the keypress event.
There is only one control on that form. The form is used for a scanner to input data into the field (barcode). So, that would work in this case.