Dialog text box press enter to process

Dialog text box press enter to process

Hi, I have a dialog with a single text field that I want to process when enter is pressed.  I tried a keypress event to click the OK button, but the button does not seem to have a click method.  I'm open to other ideas if it's doable.