Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Releasing Forms

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
GB
I have some code in the "lost focus" of a "text" object which does the following.
Check to see if the input is valid. If it is the present from is released and another form is activated :
Thisform.Release
Do form .......

Problem I have the program appears to start the other form then come back to the present form (thisform.Activate) before the present form is released. Is this normal?? How can I stop it from calling the activate code of the present form???
 
Try a THISFORM.Hide before the Release. I didn't try it myself before posting this but it should hide it right after validation otherwise, the refresh fires automatically.

Dave S.
 
You should not place do form in the form event. You should place do form in a program.

e.g.
In test1.prg
do form forma <= execute form forma
do form formb <= after execute form forma, then execute formb.

:)
 
Your best bet would be to place the code in the textboxes &quot;Valid&quot; event. ie:

IF ValidData
DO FORM myForm
THISFORM.Release
ELSE
RETURN .F.
ENDIF

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top