>>DEFINE CLASS form1 AS form >> >> >> Top = 0 >> Left = 0 >> DoCreate = .T. >> Caption = "Form1" >> Name = "Form1" >> >> >> ADD OBJECT timer1 AS timer WITH ; >> Top = 24, ; >> Left = 36, ; >> Height = 37, ; >> Width = 61, ; >> Name = "Timer1" >> >> >> ADD OBJECT command1 AS commandbutton WITH ; >> Top = 36, ; >> Left = 204, ; >> Height = 37, ; >> Width = 73, ; >> Caption = "Command1", ; >> Name = "Command1" >> >> >> PROCEDURE timer1.Timer >> this.Enabled = .F. >> SELECT id FROM Table1 WHERE id <> 1 INTO CURSOR j >> * _tally: 50 >> this.Enabled = .T. >> ENDPROC >> >> >> PROCEDURE command1.Click >> Application.AutoYield = .T. >> thisform.timer1.Interval = 100 >> thisform.timer1.Enabled = .T. >> FOR x = 1 TO 100000 >> SELECT id FROM Table1 WHERE id = 1 INTO CURSOR viv >> * _tally: 1 >> DOEVENTS && No problem if this is not here >> IF _tally <> 1 >> SET STEP ON >> ENDIF >> ENDFOR >> =MESSAGEBOX("Done") >> ENDPROC >> >>ENDDEFINE >>>>Only fails if the 'DOEVENTS' is immediately after the 'SELECT' and AutoYield's true. Doesn't ness. prove anything tho....