Closing a modal form?

  • Thread starter Thread starter Karen
  • Start date Start date
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.
 
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"
 
Back
Top