Wayne, By activate I mean run code behind button. What I
want to do in a macro or VB code is just like I clicked on
the command button. Thank you for your help. RBBor change the Enabled status of>-----Original Message-----
>By "activate" do you mean run the code behind the buttonTrue>the button?
>The VBA code for the latter from the main form would be:
>Me.sfmNameOfSubformControl.Form.NameOfButton.Enab led =the main form that holds the>
>The sfmNameOfSubformControl is the name of the control onthey may be the same.>subform, not the name of the subform itself, althoughnews:02de01c3436a$dd27e700$a501280aphx.gbl...>
>Microsoft Access MVP
>"RBB" <BRADBLAKEAOL.COM> wrote in messagehave>> How can you activate a command button with a macro? Iworks>> a "COMMAND BUTTON" called refresh, on a subform thatBUTTON">> very well. I would like to activate this "COMMAND>>> from the main form via a macro or very simple code.