Insert a DOEVENTS call in your DO WHILE .T. loop to let VFP process the timer:
DO WHILE .T.
IF mytable.flag = .T. OR ThisForm.timeoutflag = .T.
Exit
ENDIF
SELECT mytable
Seek...
DOEVENTS
ENDDO
HTH
>I am trying to minic a timeout function on a form. I want to loop until a record recieves a flag or a certain time has elapsed. I did the following but the code never picks up the properety change.
>
>ThisForm.Timer.Interval = 20000(sets ThisForm.timeoutflag = .T.)
>Do While .t.
>If mytable.flag = .T. Or ThisForm.timeoutflag = .T.
>Exit
>EndIf
>Select mytable
>Seek...
>EndDo