Command Button

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

Guest

Is there a way to set a command button to run a different macro based on what
is selected in a option group.
 
On the OnClick event of the button you can write the code

Select Case Me.OptionGroupName
Case 1
docmd.RunMacro "Macro1Name"
Case 2
docmd.RunMacro "Macro2Name"
Case Else
docmd.RunMacro "Macro3Name"
End Select
 

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