<si************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Email client is outlook.
The none excel method looked like this...
Dim strList As String
With Me.trainingplan.Form.RecordsetClone
.MoveFirst
While Not .EOF
strList = strList & vbCrLf & Nz(.Fields("Course"))
.MoveNext
Wend
End With
sAddedtext = sAddedtext & "&Subject=" & "Training Plan"
sAddedtext = sAddedtext & "&Body=" & strList
stext = "mailto:" & stext
Would you consider the DoCmd.SendObject method of sending an e-mail instead
of Call rubbish(hwnd, "open", stext, vbNullString, vbNullString, 1) as per
previous example.
Private Sub cmdEmail_Click()
On Error GoTo Err_Handler
Dim strList As String
strList = "One" & vbCrLf & "Two" & vbCrLf & "Three"
DoCmd.SendObject , , , , , , , strList
Exit_Handler:
Exit Sub
Err_Handler:
Select Case Err.Number
Case 2501 'E-mail cancelled - ignore this
Case Else
MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
End Select
Resume Exit_Handler
End Sub
With the Excel method, you can change the design of the query, so instead of
prompting you for the Staff Name parameter it reads it from the form. You
do this by changing the criteria
from [Enter the Staff Name]
to Forms![My Form]![Staff Name]
or whatever your form is called.