Force a command button to click

  • Thread starter Thread starter Gina
  • Start date Start date
G

Gina

Does anyone know how to force a command button to click.

ie: I want when the user click the tabpage for a command button to click
thereby forcing the On_Click event, this way no one has to remember to click
it. I can then make this button invisible. I can SetFocus but I can't
force the On_Click event to occur.

Thanks for ANY help!
 
Gina said:
Does anyone know how to force a command button to click.

ie: I want when the user click the tabpage for a command button to click
thereby forcing the On_Click event, this way no one has to remember to click
it. I can then make this button invisible. I can SetFocus but I can't
force the On_Click event to occur.

The forest is blocking the trees. :-)

Move the code from the button's click event to the Change event of the TabControl.
All you have to do is add a line to test for the proper TabPage.

If Me!NameOfTabControl.Value = 2 Then '(third page example)
copy button code here
End If
 
Back
Top