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

Problem with closing a form 1

Status
Not open for further replies.

MikeCt

Programmer
Nov 6, 2001
44
US
I've written a procedure where one form opens another form
using " frm_InventorySearch.Show vbModal "
This second form collects user inputs then send back this data to the original form which performs a search to find
the correct record.
The correct file is located and the outcome is correct but the screen freezes while unloading.
The screen remains frozen till the search in the original form is completed. How can I force the first screen to unload completely before the search begins in the original form?
Were talking seconds here but the look is very unprofessional.

Thanks
Mike
 

Strategically placed [tt]DoEvents[/tt] would fix the problem, but you would have to show us your code.

Have fun.

---- Andy
 
DoEvents is the invention of the devil, and best avoided if possible ...
 

OK, I'll be good, I'll be good :)

I am sure we can avoid DoEvents and do it with proper order of unloading, activating, and refreshing the forms). As soon as we can have a pick at the code...

Have fun.

---- Andy
 
So basically...

(From Form1)
Form2.Show vbModal, Me

(From Form2 when time to unload)
Me.Hide
Form1.MyPublicSub InformationToPass
Unload Me

Should solve your problems without the use of doevents...



Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top