Email a form...

popen

Registered User.
Local time
Today, 11:43
Joined
Oct 16, 2000
Messages
37
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
 
To send a control from a form you would do it like this:
Code:
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.

Code:
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!
 

Users who are viewing this thread

Back
Top Bottom