I have a couple of forms created with the Forms Wizard (I am new to VB). I have a form that opens from another form. When the user clicks on the exit button on the second form I want the underlying form to close too. is there a simple way to do this?
If you are using the macro just issue the command to close that form aswell as the current form in the macro. If using VBA then use either Unload <formname> or <formname>.close. I can't quite remember the proper syntax. The unload method is how it is done in VB.<br>
<br>
James
If you used the Wizard to create an "Close" button on Form2, you can add this to the button's "OnClick" event: DoCmd.Close acForm, "Form1"<br>
If you didn't create an "Close" button on the form but used the standard Windows one, you can add the code to the OnClose event of Form2.<br>
See Help for "Close Method (Microsoft Access)" to see options for saving changes etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.