Closing a modal form?

K

Karen

On a form which is modal and popup, I do some things then I want to close the form and return to the form that opened it. When I use DoCmd.Close in the code of the modal form, it closes the form that opened it, not the modal form. Help.
 
S

Sandra Daigle

Hi Karen,

Try changing the command to use the acForm parameter along with the name of
the form.

' If the close command is issued from the modal form's class module
docmd.close acform, me.name

'Anywhere else
docmd.close acform, "frmMyModalForm"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top