View Full Version : Email a form...


popen
11-11-2000, 03:08 PM
I am trying to use the SendObject command to email the contents of the current form.
Once the command button is clicked, the new message opens up fine, but EVERY record in the table is contained in the body of the email !!!
I only want the current record to be displayed.
Anyone out there who can help me please ?
Thanks,

-NLP

Talismanic
11-13-2000, 04:42 AM
To send a control from a form you would do it like this:

DoCmd.SendObject , , , "someone@noone.com", , , "Sample Message",Me.[ControlName], False

You will need to concatenate two or more controls with the & (ampersan).

Here is an example of one I use, in this the Date, Employee and Conversation are all listed in the body of the email. Each with its own heading. The vbCrLf forces a carraige return to keep the controls on seperate lines of the email.


DoCmd.SendObject , , , , , , "Employee/Office Conversation Log", _
"Date: " & Me.Date & vbCrLf & "Contact: " & Me.OfficeEmployee & vbCrLf & _
"Employee Name: " & Me.EmployeeName & vbCrLf & vbCrLf & "Conversation: " _
& Me.Conversation, False

Post back if you have more questions!