Public oForm oForm = Createobject('SampleForm') oForm.Show() Define Class SampleForm As Form DataSession = 2 Height=300 Width=500 Add Object txtName As TextBox With Top = 10, Left = 10 Add Object myGrid As Grid With Top=40,Height=260,Width=500,Anchor=15 Procedure Load Select contact As EmployeeName ; FROM (_samples+'data\customer') ; INTO Cursor Employees ; nofilter Use In 'customer' Endproc Procedure myGrid.Init With This .RecordSourceType = 4 .RecordSource = "SELECT EmployeeName " +; " FROM Employees "+; " WHERE UPPER(EmployeeName) like ?m.SearchName" +; " INTO cursor crsResults nofilter" Endwith Endproc Procedure txtName.InteractiveChange Local SearchName SearchName = '%'+Upper(Trim(This.Value))+'%' Thisform.myGrid.RecordSource = Thisform.myGrid.RecordSource Endproc EnddefineCetin