B
Bruce
I have a simple database that is working pretty well for
the most part. The database replaces a form that was used
when a document needed to be reviewed, and also replaces
the form that was used to log the progress of the review.
In the database I select the reviewer's name from a combo
box (cboName) that has as its row source tblNames. The
name needs to be stored in tblMain. That works. Now I
would like to add a button next to the name to send the
reviewer an e-mail (to notify the reviewer that he or she
has been assigned to review the document, for instance).
Since the name has already been selected, it would be good
to be able to send the e-mail to that person. I could use
something like
DoCmd.SendObject acSendNoObject, , , Me![cboName], , , Me!
[Subject], "Message Body"
but that would place the person's name and not the e-mail
address into the e-mail message's To:. If the combo box's
underlying table (tblNames) had a field for e-mail
address, is there some way I could have the command button
place that rather than the bound column (the person's
name) into the To: field? Or is there an approach I am
not seeing? Main thing is I only want to select the name
once.
A related question: I have used this technique on another
form. It works well, unless you want to reconsider
sending the e-mail. If you cancel the e-mail, you get an
error message that the Send Object action was canceled. I
expect I need to add something to trap that error, but I
don't know how, or for that matter if I am using the
correct terminology.
the most part. The database replaces a form that was used
when a document needed to be reviewed, and also replaces
the form that was used to log the progress of the review.
In the database I select the reviewer's name from a combo
box (cboName) that has as its row source tblNames. The
name needs to be stored in tblMain. That works. Now I
would like to add a button next to the name to send the
reviewer an e-mail (to notify the reviewer that he or she
has been assigned to review the document, for instance).
Since the name has already been selected, it would be good
to be able to send the e-mail to that person. I could use
something like
DoCmd.SendObject acSendNoObject, , , Me![cboName], , , Me!
[Subject], "Message Body"
but that would place the person's name and not the e-mail
address into the e-mail message's To:. If the combo box's
underlying table (tblNames) had a field for e-mail
address, is there some way I could have the command button
place that rather than the bound column (the person's
name) into the To: field? Or is there an approach I am
not seeing? Main thing is I only want to select the name
once.
A related question: I have used this technique on another
form. It works well, unless you want to reconsider
sending the e-mail. If you cancel the e-mail, you get an
error message that the Send Object action was canceled. I
expect I need to add something to trap that error, but I
don't know how, or for that matter if I am using the
correct terminology.