>Let me try to explain again.
>
>I used one variable pxclick as a public and place it in the load event of the mainform(sinvoice.scx), I intialized it with .f.
>
>There is a command button on the form through which I call price verification (itempx.scx) form. If I click on command button (do form itempx) it appears if the focus is other then the textbox(Barcode field). But when the focus is move to the textbox(barcode field) and I call the (itempx.scx) it checks the routine of lost focus event of the textbox of barcode field.
>Therefore, when click on command button I initialize (pxclick with .t.) and I keep the syntax like in lost focus event of the barcode is ....
>If ! pxclick
> ...check the validity of the barcode field
> ...
>else
> do form itempx
>endif
>
>Now, I also include the syntax in the command button of the mainform(sinvoice.scx) like ..
>
>pxclick = .t.
>do form itempx
>
>Therefore, it loads the form twice one in background and one in foreground. Which I found active when I released the mainform(sinvoice.scx).
>
>I hope you got me properly.. please guide
>
>Thanks - Saif
thisform.AddProperty([itempx], NULL)
pxclick = .t.
IF ISNULL(thisform.itempx) OR;
TYPE([thisform.itempx.Name]) == [U]
do form itempx NAME thisform.itempx LINKED
ELSE
thisform.itempx.Show()
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.