SELECT * from MSTR WHERE 0=1 INTO CURSOR csrMstr READWRITE NOFILTERNow, in the form designer, set up your grid with the RecordSource of csrMstr and a RecordSourceType of 1-Alias. You can even lay out your columns visually using the MSTR table and editing the controlSources of the columns to point at csrMstr.
Thisform.ResetGrid()
This code in the form's ResetGrid() method:*** Rebuild the cursor used as the recordSource for the grid SELECT csrMstr ZAP lcWhere = [UPPER(inname) = '] + UPPER(TRIM(thisform.pageframe1.page1.text1.Value)) + [' and nam1 = '] + thisform.pageframe1.page1.text4.Value + ['] SELECT * FROM MSTR WHERE &lcWhere INTO CURSOR Temp NOFILTER SELECT csrMstr APPEND FROM DBF( [Temp] ) USE IN Temp GO TOP IN csrMstr IF RECCOUNT( [csrMstr] ) > 0 Thisform.PageFrame1.ActivePage = 2 Thisform.PageFrame1.Page2.Grid1.Refresh() ELSE MESSAGEBOX( [No Records Match Your Criteria] ) ENDIF