Creating a button in a form that will open another and close itsel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi can somebody tell me how I can create a button in a form that will open
another and close the form in which the button was pressed. Similar to the
reguler next screen button you find in most software?
 
Simply create a form using form wizard
1) select button from toolbar
2) You will be able view command as openform
3) select form that need to be opened

However, while view code:
Be sure insert DoCmd.Close before DoCmd.OpenForm

That will close main form and will open other form.

I'm still not sure why would do that.
Most program's preferences is to keep main form open.

Anyways I hope that help!
Phil
 
Hi can somebody tell me how I can create a button in a form that will open
another and close the form in which the button was pressed. Similar to the
reguler next screen button you find in most software?

After you add a command button to the form, code it's click event:
DoCmd.OpenForm "OtherFormName"
DoCmd.Close acForm, Me.Name
 

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

Back
Top