Joe Yoder wrote on 2016-02-23:
Thanks guys for the input.
The statistics method calls the form refresh already. I was confident
that
DOEVENTS would solve the problem but including one before calling and one every other line inside the method had no apparent effect.
I have not tried the timer - it seems like overkill but I did try a wait window before calling the statistics method. For some reason the wait window did not seem to show up.
I just now caught what is happening - the wait window comes up at the
same
time the secondary form comes up. That means the code after calling the form executes right away so I expect the solution is stop execution until the secondary form is exited. How do I do that?
Joe
Joe,
One way is to make the secondary form Modal.
Another way is to pass an object reference of the first form to the second form. It is received in Init. Do form secondary with thisform
Save the object reference passed to the Init to a property of the secondary form. In the Destroy event, call a method of the first form to continue processing. ThisForm.ParentForm.ContinueMethod() Be sure to release the object reference you placed on the secondary form. ThisForm.ParentForm = .NULL.
Then, in your ParentForm.ContinueMethod be sure the form is still visible before processing anything.
There's also BindEvent that can help with these things too.
Tracy Pearson PowerChurch Software