>Hello,
>
>I am using VFP 6.0.
>
>In one of my forms, I have a searchbutton to look up and select a record. The code of it's click-event is:
>
>DO FORM fvestpen && the searchform
>SELECT vestigin
>IF oDialog.RecordSelected <> 0
> SEEK oDialog.RecordSelected ORDER Vestkey
> THISFORM.txtAanvrager.SETFOCUS()
> THISFORM.REFRESH()
> oDialog.RecordSelected = 0
>ENDIF
>THISFORM.REFRESH()
>
>When I clich the searchbutton, the searchform opens, but the rest of the code is executed immediately after the searchform is opened, so the RecordSelected = 0 still. We cannot find why the rest of the code is done right away and not after the closing of the searchform..
>
>Thanks in advance for your time and help.
>
>Bernard (on the account Koos Veel)
Is your search form modal? That would prevent it from executing the other code until it was finished.