A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old August 17th, 2005, 05:50 PM
Lisa
external usenet poster
 
Posts: n/a
Default How do I close a form that's not being used in Access?

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?
  #2  
Old August 17th, 2005, 05:56 PM
SusanV
external usenet poster
 
Posts: n/a
Default

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"

--
hth,
SusanV


"Lisa" wrote in message
...
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?



  #3  
Old August 18th, 2005, 05:03 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

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

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"SusanV" wrote in message
...

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"

"Lisa" wrote in message
...
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?



  #4  
Old August 18th, 2005, 12:23 PM
SusanV
external usenet poster
 
Posts: n/a
Default

Really - I never knew that! Thanks for the heads up!

"Allen Browne" wrote in message
...
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

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"SusanV" wrote in message
...

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"

"Lisa" wrote in message
...
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?





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Losing recordset object with form close and docmd.quit Bruce Using Forms 16 April 26th, 2005 01:59 AM
Design help, please SillySally Using Forms 27 March 6th, 2005 05:11 AM
Need to clear controls of Filter form Jan Il Using Forms 2 November 28th, 2004 03:04 PM
Cant Close form after opening another form??? Dave Elliott Using Forms 3 October 2nd, 2004 05:30 AM
dlookup miaplacidus Using Forms 9 August 5th, 2004 09:16 PM


All times are GMT +1. The time now is 05:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.