Sergey,
Thank You. That is a very good idea. I thought there had to have been a better way. :)
Chris
>I think you are looking into this problem from the wrong angle.
>Create form that shows questions and accepts answers. On that form create custom method GetNextQuestion with code like this
Select Mytable
>IF NOT EOF()
> Skip
> Show new question
> create cursor of valid answers
>ELSE
> * No more questions, Set property of the form to indicate that
> Thisform.NoMoreQuestions = .T.
>ENDIF
and call it from Submit button on your form. This way a user controls the flow of the program. It's very easy to add 'Back' and 'Cancel' buttons to this form.
>
>>Hi,
>>
>>I have some code that looks like this:
>>
>>
>>scan a table of questions
>> ask question
>> create cursor of valid answers
>> user picks answer from list of valid answers
>>endscan
>>
>>
>>My problem is that I don't know how to 'pause' for user input in the middle of a scan loop. I was thinking of setting up a form and using addobject at the end of the scan loop to add a new combobox. But how can I allow the user to answer the question before it goes back to the beginning of the scan loop where it will generate an error message?
>>
>>Any suggestions are appreciated.
>>
>>Thanks,
>>Chris