* Form.Load() create cursor GrdCursor (...)By the way, you don't usually need a variable for an alias; the alias itself is a "variable" that points to a table or cursor. You can safely hardcode the alias name, without using a variable - and thus simplify your code a little.
>&&at my form--> event activate >thisform.Grid1.RecordSource = "grdCursor" >thisform.Grid1.Refresh() >>
>&&at mytext--->event keypress >old_alias = ALIAS() >flag_use = .f. >IF .NOT. USED("Table1") > SELECT 0 > USE table1 > flag_use = .t. >ENDIF >------------------------------- > GATHER MEMVAR > grdTable = thisform.Grid1.RecordSource > SKIP IN (grdTable)&& error message alias 'grdcursor'is not found > IF EOF() > SKIP -1 IN (grdTable) > ENDIF >>