august
* Add a new form property called .DataToFind
* Add a new grid, grdTABLE, .RecordSource being TABLE you want to search
* Place this code in the KeyPress event of the textbox
* You will need to decide what filter expression is appropriate, determined by your OptionGroup.
* As you type in your string, the number of records shown in .grdTABLE will reduce until you can see the one you want.
IF LASTKEY() = 3 OR ;
[tab][tab]LASTKEY() = 5 OR ;
[tab][tab]LASTKEY() = 9 OR ;
[tab][tab]LASTKEY() = 15 OR ;
[tab][tab]LASTKEY() = 24 OR ;
[tab][tab]LASTKEY() = 27
[tab]MESSAGEBOX([You have pressed the wrong key] ,;
[tab][tab]0 + 48 + 0 ,;
[tab][tab][Invalid keypress])
ELSE
[tab]SELE TABLE
[tab]THISFORM.DataToFind = ALLT(THIS.Value)+ CHR(nkeyCode)
[tab]SET FILTER TO ;
[tab][tab]UPPER(THISFORM.DataToFind) $ UPPER(TABLE.field_1) OR ;
[tab][tab]UPPER(THISFORM.DataToFind) $ UPPER(TABLE.field_2) OR ;
[tab][tab]UPPER(THISFORM.DataToFind) $ UPPER(TABLE.field_3) OR ;
[tab][tab]UPPER(THISFORM.DataToFind) $ UPPER(TABLE.field_4) OR ;
[tab][tab]UPPER(THISFORM.DataToFind) $ UPPER(TABLE.field_5)
[tab]THISFORM.grdTABLE.Refresh()
ENDIF
* To clear the filter - SET FILTER TO
Chris [sig][/sig]