Emailing from a subform control

vangogh228

Registered User.
Local time
Today, 06:57
Joined
Apr 19, 2002
Messages
302
I have successfully used the following code on the On Click event to open an email to the address shown in the subform's PrincipalEmail control:

Private Sub PrincipalEmail_Click()
Application.FollowHyperlink "mailto:" & Me.PrincipalEmail
End Sub


But, I would like to capture a subject line from the ProjectName control in my main form. I have not used this technique for emailing before and don't know how to:

1) Populate the subject line.
2) Grab the data from the control on the main form.

Searches have been very fruitful in many ways... but I have not found the answer to this exact question. I may be missing an obvious answer, but any help is greatly appreciated. THANKS.

Tom
 
Go into the event tab and edit the On Click code. when you see the line similar to this....

DoCmd.SendObject acReport, stDocName

drop your cursor to the end and add commas , , , , You should see a help box appear with [to],[cc],[bcc],[subject] etc.

This is where you will need to specify your field that will display as the subject header.

ie

DoCmd.SendObject acReport, stDocName, , , , , Me.Field1.Value

You could also predefine an email address here if you wish.

Hope this helps

Kempes
 

Users who are viewing this thread

Back
Top Bottom