create table table1 (field1 i) append blank oEditForm = createobject('EditForm') oEditForm.Show(1) DEFINE CLASS editform AS form Top = 0 Left = 0 Height = 96 Width = 158 DoCreate = .T. Caption = "Form3" Name = "edit" ADD OBJECT text1 AS textbox WITH ; ControlSource = "table1.field1", ; Height = 23, ; Left = 30, ; Top = 18, ; Width = 100, ; Name = "Text1" ADD OBJECT command1 AS commandbutton WITH ; Top = 54, ; Left = 85, ; Height = 27, ; Width = 50, ; Caption = "Exit", ; Name = "Command1", ; Cancel = .T. ADD OBJECT command2 AS commandbutton WITH ; Top = 54, ; Left = 30, ; Height = 27, ; Width = 50, ; Caption = "OK", ; Name = "Command2", ; Default = .T. PROCEDURE command1.Click DELETE thisform.release() ENDPROC PROCEDURE command2.click append blank thisform.refresh() thisform.text1.setfocus() ENDPROC ENDDEFINE