Wizards - Simple Open and Close Forms

J

Jack Marks

Isn't there an easy way, without writing a lot of code, to use a command
button to close form A and open form B?
 
R

Randy

Jack said:
Isn't there an easy way, without writing a lot of code, to use a command
button to close form A and open form B?

Jack,

'To open a form use:
DoCmd.OpenForm "MyFormName"

'To close one use:
DoCmd.Close acForm, "MyFormName"

You can also use the Add Button Wizard which creates any button for a large
variety of operations, and you don't have to code. With the wizard you can
also specify graphics attached to your buttons. The wizard also adds error
handling code.

-Randy
 
J

Jack Marks

Can't seem to find the wizard...


Randy said:
Jack,

'To open a form use:
DoCmd.OpenForm "MyFormName"

'To close one use:
DoCmd.Close acForm, "MyFormName"

You can also use the Add Button Wizard which creates any button for a
large variety of operations, and you don't have to code. With the wizard
you can also specify graphics attached to your buttons. The wizard also
adds error handling code.

-Randy
 
R

Randy

Jack said:
Can't seem to find the wizard...

Jack, The Wizard is available from the toolbox, when the form is open in
design mode. If you cannot see the toolbox, click on "View" from the system
menu and then click on "Toolbox." The toolbox will pop up and there you will
need to click on the button (described as "command button" with yellow
floating text). After clicking once on it, draw or drag-n-drop on your form
designing area. The Command Button Wizard will start up and guide you
through the steps to create actions and pictures for your new button.

-Randy
 
Top