How do I close a form that's not being used in Access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Any advice on how to hide/close forms that aren't being used. Several forms
are used to drill down to detail information. Is there a way to close the
forms that are opened to get there?
 
Hi Lisa,

In the event which opens the next form (OnClick or whatever), add a line of
code after the openform action to close the current form, like this:

DoCmd.OpenForm "NameOfNextFormToView"
DoCmd.Close acForm, "NameOfCurrentForm"
 
While Susan is correct, you need to be aware that the Close action/method
*loses* your data without telling you if you have unsaved edits in the form
at the time you close it.

Details in:
Losing data when you close a form
at:
http://allenbrowne.com/bug-01.html
 
Back
Top