concatenating a field from multiple subform records



I'm trying to build a concatenated string of email addresses from a selected
group of records in a subform. My purpose is to send an email to a group of
contacts whose check boxes have been selected by a user.

I'm currently using the SendObject method of the DoCmd object to send the
email to a single recipient, but I need to loop through the subform records
that are checked to build the concatenated string containing the addresses
of all contacts in the selected group.

Assuming that my objects are named as follows:

Main form: frmProjects
Subform control: ctlContactsSub
Subform: frmContactsSub
Email field in subform: txtEmail
Checkbox field in subform: chkInclude

Can someone Please tell me how to loop through those subform records so I
can concatenate the email fields in the checked records?

Thanks in advance,

Paul


.



Relevant Pages

  • Selection check box on form
    ... I would like to have a check box on a continuous form that ... would allow the checked records on the form ... but with the subform I am unable to use a continuous main ... be "interactive" and allow the user to sort feilds in the ...
    (microsoft.public.access.forms)
  • Re: concatenating a field from multiple subform records
    ... group of records in a subform. ... Email field in subform: txtEmail ... Can someone Please tell me how to loop through those subform records so I ... and appended them to a string variable. ...
    (microsoft.public.access.formscoding)

Loading