apuntch123
Oct 13 2004, 02:49 PM
I have a couple of databases that email reports via a macro or VBA using the SendObject command. The names of the recipients are keyed into one of the two and it is ran by the user to send their reports. However, we often need to make changes to the recipient names and only someone authorized to design view of the macro or code can change those names. Is there some way to show a macro in design view so that each user can maintain their own distribution lists?
ScottGem
Oct 13 2004, 03:16 PM
You shouldn't be hardcoding the names. Set up a table that has the names and reference that table in your code.
Then all you need is a form to maintain the table.
apuntch123
Oct 13 2004, 03:37 PM
That's the scenerio I would like to create. How would you reference the table field using the SendObject command or would you set it up differently?
ScottGem
Oct 13 2004, 06:06 PM
There are a few ways. The way I would probably do it is to set up a multiselect list box where the user can select the names to sdend to. Then you can concatenate the selected names and use that as your To parameter. See multiselect listbox in the Forms section at
www.mvps.org/access for details on how to concatenate the names.