LPARAMETERS nKeyCode, llSearchNumbersOnly
LOCAL llRecJump
llRecJump = .F.
DO CASE
CASE nKeyCode = 3
THISFORM.p_Buffer = ""
THISFORM.cntActions.txtDrugFilter.VALUE = ""
CASE nKeyCode = 13
THISFORM.grdProfile.SETFOCUS
Thisform.Refresh
CASE nKeyCode = 32
THISFORM.p_Buffer = THISFORM.p_Buffer + " "
llRecJump = .T.
CASE (nKeyCode = 7) OR (nKeyCode = 127)
IF LEN(THISFORM.p_Buffer) > 0
THISFORM.p_Buffer = LEFT(THISFORM.p_Buffer,(LEN(THISFORM.p_Buffer) - 1))
llRecJump = .T.
ENDIF
CASE BETWEEN(nKeyCode,33,126)
IF BETWEEN(nKeyCode,48,57)
THISFORM.p_Buffer = THISFORM.p_Buffer + CHR(nKeyCode)
llRecJump = .T.
ELSE
IF !llSearchNumbersOnly
THISFORM.p_Buffer = THISFORM.p_Buffer + CHR(nKeyCode)
llRecJump = .T.
ENDIF
ENDIF
ENDCASE
RETURN llRecJump
And the grids name is grdProfile (not what I said earlier....)
Thanks!
>It sounds like you are filtering out the CHR(13). Can you post the Keypress code?
>
>Glenn
>
>>Hello Gurus!
>>
>>Thanks for the help yesterday! You guys (and ladies!) are great!
>>
>>Now, onto todays question.
>>
>>I have some data entry objects on a form... don't we all???
>>
>>In particular, I have a textbox, where as the user types in a string of data, EACH character is intercepted by a KEYPRESS event and analyzed.
>>
>>If it is a character, it is added to the string and used to FILTER a grid above the textbox, so the user can see in realtime a filterd look at the data (and it is FAST too....).
>>
>>OK... now we want to allow the user to JUMP directly to the grid (so they can move through the rows and select the ones they want to work with) IF they type in an ENTER key at the end of the string. Right now, it doesn't jump up there, even if I intercept the ENTER key (char 32) and do a SETFOCUS on the grid.
>>
>>The txtbox is named txtDrugFilter
>>and the grid is called grdPrescriptions
>>
>>Any ideas? Thanks in advance!!
>>
>>Tommy (and Karen)
Tommy Tillman A+ NetWork+ MCP