• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

How do I 'unload' a form?

Why doesnt the terminate event of a form fire when I have this in a fucntion when a user clicks on exit:

Unload ME
1 Solution

'unload event

Dim Form As Form
For Each Form In Forms
      Unload Form
      Set Form = Nothing
   Next Form
The ME is based on which form has the focus, if the form that the command button is on has the unload me in the click event it will fire the terminate event. My guess is you are confused and placed the code in the wrong event. One way to trace this problem is in each forms terminate event place a debug.print statement with that forms name in it. Then click the exit button and go to the debug window to see which form terminated event got fired.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now