Sample argument
Hi,
Below is some sample code that will invoke your mail client and use the e-mail address contained in the [EmailAddress] field and pass it on to your mail client together with a subject line and some body text. Ensure that you have a field called [EmailAddress] on your form if you want to use the code as is. Call your button btMailToCustomer.
CODE:
---------------------------------------------------------------------------------
Private Sub btMailToCustomer_Click()
On Error GoTo Err_btMailToCustomer_Click
Dim stDocName As String
DoCmd.SendObject , , , [EmailAddress], , , "Enter your subject here", "This e-Mail was generated by ....blah...blah"
Exit_btMailToCustomer_Click:
Exit Sub
Err_btMailToCustomer_Click:
MsgBox Err.Description
Resume Exit_btMailToCustomer_Click
End Sub
-----------------------------------------------------------------------------------
See the attached JPEG for a screenshot of my form.
Cheers