If the add-on is not running and the user types the first few letters of an Item Code into the column followed by an * and then presses the Return key, a list of the items beginning with those letters is returned to select from.
However, if I am running my add-on and I press Return as before it acts as though the ADD button has been clicked. I'm guessing maybe this is because the ADD button has focus even when typing in the grid?
Can anyone help me to prevent my code from triggering unless it really is the ADD button being clicked?
This is the event I am trapping...
If pVal.ItemUID = "1" And pVal.EventType = et_CLICK And pVal.Before_Action = True And (pVal.FormMode = fm_ADD_MODE Or pVal.FormMode = fm_UPDATE_MODE) Then
Thanks for any help,