How to prevent user pressing Enter key?

 1 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Terry P
Veteran Member
Posts: 234
Veteran Member

    Does anyone know a way to trap or prevent a user from pressing the "Enter" key instead of the "Tab" key.

    In AP20 (and other forms), when a user is in a key field and presses the enter key, it pops up the select box where they can search etc. In AP20, the Purchase Order field is not a required field and can be left blank. They "should" be tabbing thru the field.

    The real problem is after they enter a PO number in the field, I go out and retrieve PO info using a DME call. If the PO number is invalid, I want to tell them to enter a valid PO number or leave blank, then place the cursor in the PO field for them to do that.

    That all works, EXCEPT if when entering the PO number they press the "enter" key instead of the "tab" key, it goes out and calls the search screen, and gets in a loop which you can't get out.

    I was hoping to figure out a way to "trap" if the user pressed the enter key, and to prevent it from doing the search.

    Any suggestions?

    michael2
    New Member
    Posts: 3
    New Member
      Easiest way to do this is to use DS to take away the "Allow Select:" for the field.  Of course, this also takes away the ability to Select from a drop down in this field...