close one form when another is opened

K

Kayla

what is the code that is used on a command button that
when it is clicked, the form in view is closed and opens
another form. For example form A and form B. when the
control on form A is clicked, form A is saved and closed
and form B opens. Thanks
 
R

Rick B

I just answered this about two days ago. Do a search.

The answer given was...

Private Sub SomeButton_Click()
DoCmd.Close acForm, "MainFormName"
DoCmd.OpenForm "SecondFormName"
End Sub





Rick B


what is the code that is used on a command button that
when it is clicked, the form in view is closed and opens
another form. For example form A and form B. when the
control on form A is clicked, form A is saved and closed
and form B opens. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top