Staying in Open Form

Kiwi-Wombat

Registered User.
Local time
Today, 03:38
Joined
Aug 2, 2004
Messages
56
I have a form which opens a subform when the user clicks a button. The form is opened using the "DoCmd.OpenForm" method.

The subform then displays a field that lists all the records in a database. I want the focus to stay on this form until the user selects one of the records.

What is currently happening is that after the form opens, the focus then goes back to the main form and continues running the remainder of the intstruction in the On Click module.

Is there a way of keeping it on the subform until either the form is closed with the close button ,or the user selects an item from the list?
 
This will stop code execution in the calling form until the TheFormToOpen is either closed or its visible property is set to False.

DoCmd.openform "TheFormToOpen", , , , , acDialog

Regards,
Tim
 
Thanks for that. I spent hours trying to figure out what was happening and the answer is so simple
 

Users who are viewing this thread

Back
Top Bottom