Command Button

  • Thread starter Thread starter Mike
  • Start date Start date
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
 
-----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
 
In the on-click event of the button add this line of code
before the DoCmd.OpenForm.......

DoCmd.Close

Rgds,
Glenn.
 
Back
Top