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  

Close 1st form when open 2nd



 
 
Thread Tools Display Modes
  #1  
Old August 28th, 2006, 07:17 PM posted to microsoft.public.access.forms
Anna
external usenet poster
 
Posts: 66
Default Close 1st form when open 2nd

In a form on button i open another form. I want to close the first
form. Same in 2nd form i want when user click on cancel it close the
2nd form and open the first form. How to i do that needs help.

Thank You

  #2  
Old August 28th, 2006, 07:25 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Close 1st form when open 2nd

Anna wrote:
In a form on button i open another form. I want to close the first
form. Same in 2nd form i want when user click on cancel it close the
2nd form and open the first form. How to i do that needs help.

Thank You


DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "SecondFormName"

To go back...

DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "FirstFormName"

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 




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


All times are GMT +1. The time now is 11:35 PM.


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