Can I use the Comand Button Wizard to add more than one action to a comand
button? I would like to open one form and close the current form with a
command button. Do I need to use a macro?
Tom
fredg - 23 Sep 2005 22:30 GMT
> Can I use the Comand Button Wizard to add more than one action to a comand
> button? I would like to open one form and close the current form with a
> command button. Do I need to use a macro?
>
> Tom
Just add the second action to the first action in the order you wish
them to occur:
DoCmd.OpenForm "FormName"
DoCmd.Close acForm, Me.Name

Signature
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
John Vinson - 24 Sep 2005 06:15 GMT
>Can I use the Comand Button Wizard to add more than one action to a comand
>button? I would like to open one form and close the current form with a
>command button. Do I need to use a macro?
>
>Tom
The Wizards aren't that clever; but you can use the wizard to do one
of these actions, and then edit the VBA code which the wizard created
to add the other action. See Fred's suggestion for just how to do so.
John W. Vinson[MVP]