Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search or Browse Window
Message
From
02/05/2003 18:04:11
 
 
To
02/05/2003 17:54:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00784287
Message ID:
00784429
Views:
16
maybe this will work for you: put this in the Keypress() of the form. if i remember correctly the following will only work with character indexes. i wrote this a long time ago for a form with a only grid and an exit button. hope this helps.
if Inlist(nKeyCode, 4, 5, 9, 24, 19)
	return
endif
LOCAL ;
	key_stroke, ;
	key_rec, ;
	NewKey

key_stroke = UPPER(CHR(nKeyCode))
key_rec = RECNO()
SEEK key_stroke
DO WHILE .T.
	NewKey = INKEY(.4, "H")
	IF NewKey <> 0 .AND. BETWEEN(nKeyCode, 48, 122)
		key_stroke = key_stroke + UPPER(CHR(NewKey))
		SEEK key_stroke
		IF EOF()
			EXIT
		ELSE
			key_rec = RECNO()
		ENDIF
	ELSE
		EXIT
	ENDIF
ENDDO
IF EOF()
	if between(key_rec, 1, reccount()) .or. key_rec < 0
		GOTO key_rec
	endif
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform