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  

Form Closing.



 
 
Thread Tools Display Modes
  #1  
Old January 26th, 2010, 11:04 AM posted to microsoft.public.access.forms
cel504
external usenet poster
 
Posts: 39
Default Form Closing.

I have read a few of the questions and answers in the forum regarding this,
but to be honest, I have lost the plot with it.
If I have a switcboard form, from where I navigate to the other forms, how
do I close the previous form?
Say I go from the switchboard to say to the main input form, then back to
the switchboard again. Where would I write the code to tell me to close the
main input form?

As ever any help is gradly received and appreciated. Many thanks.

Cel504


  #2  
Old January 26th, 2010, 11:34 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Form Closing.

Have a button to open the second form.

Private Sub cmdOpenForm2_Click9)
DoCmd.OpenForm "Form2"
DoCmd.Close acForm, Me.Name
End Sub


The above code will open form2 then close the switchboard.


Have a button to close form2 and return to the switchboard

Private Sub cmdOpenSwitchboard_Click()
DoCmd.OpenForm "FormSwitchboard"
DoCmd.Close acForm, Me.Name
End Sub


Note: replace Form2 and FormSwitchboard with the names of your forms.
Replace cmdOpenForm2 and cmdOpenSwitchboard with the names of your buttons.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"CEL504" wrote in message
...
I have read a few of the questions and answers in the forum regarding
this,
but to be honest, I have lost the plot with it.
If I have a switcboard form, from where I navigate to the other forms, how
do I close the previous form?
Say I go from the switchboard to say to the main input form, then back to
the switchboard again. Where would I write the code to tell me to close
the
main input form?

As ever any help is gradly received and appreciated. Many thanks.

Cel504




 




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:36 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.