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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When the following code is run from

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
When the following code is run from cmdRecalc on the frm_edit_page1 screen,

WHy does the messagebox(lc_str) appear on my frm_adhoc_results screen? It looks like the program just kept on executing the code in my cmdRecalc button- even though I assumed that a DO FORM would halt execution until the form was released.

After it launched the form. Does the cmdReCalc's code continue to execute?

How do I get the code in cmdReCalc to pause on the DO FORM command and resume execution "after" that form is released?

<cmdReCalc>
*
gn_judgement_amt = THISFORM.txtjudgement_amt.VALUE
gd_judgement_date = THISFORM.txtinterest_date.VALUE
*
DO prg_interest_calcs &amp;&amp; calculate interest
*
DO FORM frm_adhoc_results &amp;&amp; display adhoc calc and allow changes on form
*
THISFORM.txtinterest_amt.VALUE = gn_judgement_int
THISFORM.txtinterest_date.VALUE = gd_judgement_date

private lc_str
lc_str = &quot;J-Date = &quot; + dtoc(gd_judgement_date) + &quot; J-Int = &quot; + str(gn_judgement_int)
messagebox(lc_str)
The 2nd mouse gets the cheese.
 
Are you sure the form is MODAL ?


Don
dond@csrinc.com

 
Hi my friend,
Your assumption was wrong.
DO FORM will NOT halt the execution of your program until the form was released unless this form is modal form.

Nothing wrong with this, think about it...
What if you want to run multi-instance of the same form (great feature, ha). You need to be able to execute code while your form is active and visible.
So, you just need to make your form modal if you want.
Or change you program design based on the fact that Your assumption was wrong.
Thanks
Walid Magd
Engwam@Hotmail.com
 
It's been a rough week .. thanks for the break. Have a nice weekend. :)
The 2nd mouse gets the cheese.
 
All of the forms are MODAL and still same problem...
The 2nd mouse gets the cheese.
 
All forms in the project were MODAL. Does it make any difference if the form is displayed &quot;1 In Top-Level Form&quot; or displayed as &quot;2 As Top-Level Form&quot; ?

My main screen is the first Top Level form. The client screen was opened up on top of that as Top Level form also because I needed the extra room. This client screen runs the DO FORM in the original post. THe code just keeps executing and the message box appears on top of the third form. Any other ideas??? Thanks again.
The 2nd mouse gets the cheese.
 
You can not have &quot;2 As Top-Level Form&quot; and have it also be modal. When you use &quot;2 As Top-Level Form&quot; you are essentially replacing _Screen... which is never modal.

Good Luck!


-Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top