By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,847 Members | 2,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,847 IT Pros & Developers. It's quick & easy.

Closing a Form

P: n/a
Hello all

I have multiple forms, these form interact with each others using
buttons. I want to close Form A everytime I click on a button to open
Form B. So i dont have multiple forms open at the same time.

I know the code, to close the form, needs to be put under the On Click
Event button that opens the next form, but dont know how to write it


Jul 19 '06 #1
Share this Question
Share on Google+
2 Replies

P: n/a
something like

Public Sub CloseMyform()
DoCmd.OpenForm "Form2", acNormal
DoCmd.Close acForm, "Form1", acSavePrompt
End Sub

but you'd put the code
DoCmd.OpenForm "Form2", acNormal
DoCmd.Close acForm, "Form1", acSavePrompt
in the click event of your button.

judging by your questions, you would probably learn a lot from opening
a code module and poking around in VB help. Play with Northwind.
That's what it's there for.

Jul 19 '06 #2

P: n/a
Thanks for your reply, I will try the code

And whats that Northwind??? where is it???

Jul 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.