Hi Tracy, you are messing with LISA G! I don't think it is good practice to mess with LISA G. She can cause all kinds of problems if not let to her own devices. (Load Initialize Show Gotfocus)
I would recommend
Form::Init
lParamerters llFound
this.addproperty('lFound',llFound)
dodefault()
Form::GotFocus
dodefault()
if !this.lfound
=MESSAGEBOX('No matching record found.')
ENDIF
>Pass the value if found or not to the form's init. Call the form with:
>
>DO form myform NAME omyform WITH .F.
>
>and then in the form's init put something like:
>
>LPARAMETERS llfound
>DODEFAULT()
>this.show()
>IF !llfound
> =MESSAGEBOX('No matching record found.')
>ENDIF
>
>
>>I have a program which when executed runs a procedure which finds a record and then displays the information in a form. If no record is found it displays a messagebox stating no record. The problem is the messagebox shows up before the form is on the screen. How do I change this so that the form is displayed and then the messagebox?
>>
>>Many Thanks