Command Button

M

Mike

I have a series of forms used during a customer survey and
I use a command button to open the next form in the
sequence. How can I get the same command button that
opens the next form close the current form so that I don't
have a screen full of open forms.

Thank you

Mike
 
L

Larry

-----Original Message-----
I have a series of forms used during a customer survey and
I use a command button to open the next form in the
sequence. How can I get the same command button that
opens the next form close the current form so that I don't
have a screen full of open forms.

Thank you

Mike
.
If your command button is run off a macro then add the
close command to the top line of the macro.
If it is run off code then add the following to the first
line of code.
docmd.close
 
G

Glenn

In the on-click event of the button add this line of code
before the DoCmd.OpenForm.......

DoCmd.Close

Rgds,
Glenn.
 

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