I have a form with four textboxes on it (A,B,C, and D). I am trying to use the value of Textbox D to determine which of the other textboxes will receive focus. I have the following code in the keypress event for box D.
IF nKEYCODE = 13 &&ACSII for the enter key
mX = ALLTRIM(str(thisform.textD.value))
IF !ISBLANK(thisform.textD.value)
mControl = 'thisform.txt'+mX+'.SetFocus()'
&mControl
ENDIF
ENDIF
the problem I am having is if the user enters 'A' in box D the focus is set to 'A' and then focus goes to the next box in the tab order. So basically it goes to the box I want it to and then tabs from there.
Thanks in advance
IF nKEYCODE = 13 &&ACSII for the enter key
mX = ALLTRIM(str(thisform.textD.value))
IF !ISBLANK(thisform.textD.value)
mControl = 'thisform.txt'+mX+'.SetFocus()'
&mControl
ENDIF
ENDIF
the problem I am having is if the user enters 'A' in box D the focus is set to 'A' and then focus goes to the next box in the tab order. So basically it goes to the box I want it to and then tabs from there.
Thanks in advance