jwcolby
jwcolby at colbyconsulting.com
Thu Jun 28 08:56:18 CDT 2007
To my knowledge it is not possible. You can simulate that by putting a loop immediately AFTER the line that opens the form. Something like: blnOtherFormClosed = false Do DoEvents While not blnOtherFormClosed blnOtherFormClosed will be a global variable. Then as the other form closes, in it's OnClose event will SET blnOtherFormClosed to true. This will allow the calling form to exit the loop and continue processing. Crude but it should work. <Disclaimer> The code above was air compiled </Disclaimer> John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of philippe pons Sent: Thursday, June 28, 2007 8:46 AM To: accessd at databaseadvisors.com Subject: [AccessD] How to start a form in acDialog mode Hi all, I have a form, say myForm, and another one, say mySisterForm, that just show a combo box to the user. At one point, the vba code behind myForm will start mySisterForm to allow the user toselected a value from the combo. The the code behind myForm has to start mySisterForm, and wait until mySisterForm closes, and grab the selected value(put in a global variable!) This is well known, and I know how to do that using DoCmd acForm, mySisterForm .name, , , , acDialog. But the point is I want to open mySisterForm in a different way!! Dim frm as Form Set frm As New Form_mySisterForm frm.visible=True is the way I want to go...but there, the code will not wait until mySisterForm closes!!! Even if I set: frm.Modal = True How would you do that, unless it is not possible? TIA, Philippe -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com