L
Leslie Isaacs
Hello All
I have a fairly complex A97 mdb, which includes a macro which uses the
SendObject command to email a report to an individual. The report is based
on a query which takes as a parameter the value of a combobox selected by
the user - this is in fact the name of the individual that the report is
about. The individual's email address is also picked up from the current
form.
Is it possible for this macro to be run for a sequence of individuals in
turn - i.e. the report is generated and sent for one individual, then the
value of the combobox is amended to the next individual, and the report
re-generated and sent, and so on? The individual details are in table
[staffs], with the identifying parameter for the report's query being a
field called 'name' (yes, I know how terrible that is, but I inherited this
and it's firmly entrenched in the db and we seem to have got away with it!).
This table also includes a yes/no field 'current', and the report should
only be generated and sent to those individuals with a 'current' value of
True. So the 'step through' process could go in any order (say alphabetical)
but must be restricted to those records where 'current' = True.
I'm sure this can be done, but I can't see how to do it with a macro and my
vba isn't quite up to it.
Hope someone can help.
Thanks
Leslie Isaacs
I have a fairly complex A97 mdb, which includes a macro which uses the
SendObject command to email a report to an individual. The report is based
on a query which takes as a parameter the value of a combobox selected by
the user - this is in fact the name of the individual that the report is
about. The individual's email address is also picked up from the current
form.
Is it possible for this macro to be run for a sequence of individuals in
turn - i.e. the report is generated and sent for one individual, then the
value of the combobox is amended to the next individual, and the report
re-generated and sent, and so on? The individual details are in table
[staffs], with the identifying parameter for the report's query being a
field called 'name' (yes, I know how terrible that is, but I inherited this
and it's firmly entrenched in the db and we seem to have got away with it!).
This table also includes a yes/no field 'current', and the report should
only be generated and sent to those individuals with a 'current' value of
True. So the 'step through' process could go in any order (say alphabetical)
but must be restricted to those records where 'current' = True.
I'm sure this can be done, but I can't see how to do it with a macro and my
vba isn't quite up to it.
Hope someone can help.
Thanks
Leslie Isaacs