*** START OF GRID PROBLEM SAMPLE CREATE CURSOR curTmp2 (cid C(5), cproduct C(25)) CREATE CURSOR curTmp1 (cid C(6), cname C(20)) INSERT INTO curTmp1 (cid, cname) VALUES ('000001', 'test') oF1 = CREATEOBJECT('clsMyForm') oF1.Width = 600 oF1.oCmd1.Height = 20 oF1.AddObject('oGrid', 'clsMyGrid') oF1.oGrid.Recordsource = '' oF1.oGrid.Recordsourcetype = 1 oF1.oGrid.Recordsource = 'curTmp1' oF1.oGrid.Columncount = 2 oF1.oGrid.Visible = .T. oF1.oGrid.Refresh() SELECT curTmp2 oF1.Caption = "Starting with alias '" + ALIAS() + "'" oF1.AddObject('oTimer', 'clsMyTimer') oF1.oTimer.Interval = 500 && Once per half second oF1.oTimer.Enabled = .T. oF1.Show() READ EVENTS RETURN DEFINE CLASS clsMyForm AS Form ADD OBJECT oCmd1 AS CommandButton PROCEDURE QueryUnload CLEAR EVENTS ENDPROC PROCEDURE oCmd1.Click lcAlias = ALIAS() SELECT curTmp2 MESSAGEBOX("The alias was '" + lcAlias + "' but is now forced to 'CURTMP2'") ENDPROC ENDDEFINE DEFINE CLASS clsMyGrid AS Grid Top = 30 ENDDEFINE DEFINE CLASS clsMyTimer AS Timer Interval = 500 && Once per half second PROCEDURE Timer THISFORM.Caption = TIME() + " Current alias is '" + ALIAS() + "'. It should be 'CURTMP2'" ENDPROC ENDDEFINE *** START OF GRID PROBLEM SAMPLEThe sample shows a form with a command button and a grid. The command button has the focus and the currently selected area is alias 'curTmp2'. The grid shows records from alias 'curTmp1' (recordsource = 'curTmp1' and recordsourcetype = 1).