A Button to Open a Macro in Edit View

  • Thread starter Thread starter Macro Hunter
  • Start date Start date
M

Macro Hunter

I would like to make a button that opens up a Macro that is set up for
automatic e-mail. I would like to have this option for novice users to be
able to change who will receive the e-mails. If the button could pull up the
existing macro in edit view, I believe with a little instruction this would
work.
 
Macro Hunter,

This is not a good idea. Sorry.

You need to have a form, with either a textbox where the user enters the
email address of the intended recipient, or a combobox where the user
selects the intended recipient. And then you need to refer to this
textbox/combobox in the macro. If, as I am guessing, your macro uses the
SendObject action, then the 'To' argument would look like this:
=[NameOfYourTextboxOrCombobox]
(this assumes the button to run the macro is on the same form)
 
Thank You for your response. I am aware of how to set up a button to do the
procedure you suggested. If I hadn't set up so many forms around my plant I
would alter all of them to your suggestion. The button I will be setting up
will be for the database administrator only, therefore it shouldn't be an
issue of messing something up. I agree that your strategy is better and I've
used it for about a year now, but this database was made before then and has
about 90 forms on individual computers all pulling from a linked core
database. If there isn't away to pull a macro up in edit form from a button
that's okay. I guess I'm just wanting a shortcut because there are well over
a hundred macros in my database.

Thanks again for replying.



Steve Schapel said:
Macro Hunter,

This is not a good idea. Sorry.

You need to have a form, with either a textbox where the user enters the
email address of the intended recipient, or a combobox where the user
selects the intended recipient. And then you need to refer to this
textbox/combobox in the macro. If, as I am guessing, your macro uses the
SendObject action, then the 'To' argument would look like this:
=[NameOfYourTextboxOrCombobox]
(this assumes the button to run the macro is on the same form)

--
Steve Schapel, Microsoft Access MVP


Macro Hunter said:
I would like to make a button that opens up a Macro that is set up for
automatic e-mail. I would like to have this option for novice users to be
able to change who will receive the e-mails. If the button could pull up
the
existing macro in edit view, I believe with a little instruction this
would
work.

.
 
Back
Top