Public oForm oForm = Createobject('myForm') oForm.Show Define Class myForm As Form DataSession = 2 Add Object cmdRefresh As CommandButton With Top=100,Caption='refresh' Add Object txtCustID As TextBox With ControlSource = 'customer.cust_id' Add Object txtCustID2 As TextBox With ; ControlSource = 'customer.cust_id', Left = 200 Add Object txtTime As TextBox With ; top= 40,Enabled=.F.,DisabledForeColor=0,; value = Ttoc(Datetime(),2) Add Object myTimer As Timer With Interval=1000 Procedure Load Use customer Set Hours To 12 Set Seconds On Endproc Procedure myTimer.Timer Go Int(Rand()*Reccount('customer')) This.Parent.txtTime.Value=Ttoc(Datetime(),2) This.Parent.txtCustID2.Refresh Endproc Procedure cmdRefresh.Click Thisform.Refresh Endproc EnddefineCetin