Open a macro in design view using VB/macro...like OpenTable

G

Guest

I would like to be able, from a form, use a button to open a particular macro
in design mode so the user can update some of the fields. If it is possible,
how do I do it. thanks.
 
S

Steve Schapel

Billybob,

As far as I know, this can not be done.

Maybe if you could give some more details of what you are doing, with
examples, and the meaning of "update some of the fields", someone may be
able to suggest another approach.
 
G

Guest

More specifically, I have a form that allows an administrator to change the
name(s) of people that are assigned to tasks. I also have a form that alerts
the administrator that assigned tasks have not been started/completed. This
form is tied to a macro that alerts the person responsible for the task, via
email, what the task is. When the administrator changes the name of the
assigned person, I would like to have a button that would open the macro in
the design view to allow the administrator to change the person's email at
the same time. (I am using the "SendObject" action to send the email and
would like to open the macro to the design view to allow the administrator to
change the To: part.)
 
S

Steve Schapel

Billybob,

Ok, thanks for the further explanation.

I would recommend doing it something like this... Set up your form so
the person's email address is represented in a textbox or combobox
column, so when the administrator changes the person's name, their email
address is updated too. This should presumably be an automatic lookup
to the email address in a table. Then, in the To argument of the
SendObject macro, do not "hard-code" the email address, but instead
reference it from the form, using syntax such as...
[Forms]![NameOfForm]![EmailAddress]
 
G

Guest

Mr. Schapel,

Thanks! That worked perfectly.

Steve Schapel said:
Billybob,

Ok, thanks for the further explanation.

I would recommend doing it something like this... Set up your form so
the person's email address is represented in a textbox or combobox
column, so when the administrator changes the person's name, their email
address is updated too. This should presumably be an automatic lookup
to the email address in a table. Then, in the To argument of the
SendObject macro, do not "hard-code" the email address, but instead
reference it from the form, using syntax such as...
[Forms]![NameOfForm]![EmailAddress]

--
Steve Schapel, Microsoft Access MVP
More specifically, I have a form that allows an administrator to change the
name(s) of people that are assigned to tasks. I also have a form that alerts
the administrator that assigned tasks have not been started/completed. This
form is tied to a macro that alerts the person responsible for the task, via
email, what the task is. When the administrator changes the name of the
assigned person, I would like to have a button that would open the macro in
the design view to allow the administrator to change the person's email at
the same time. (I am using the "SendObject" action to send the email and
would like to open the macro to the design view to allow the administrator to
change the To: part.)

:
 

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

Top