I am able to attach Main forms data and generate mail but unable to attach subform's data. Here's the current code provided by a google search. Getting Error "Item not found in this collection'
SQL:
Private Sub cmdEmailList_Click()
On Error GoTo Err_cmdEmailList_Click
Dim CustName As String ' Customer Name
Dim varTo As Variant '-- Address for SendObject
Dim stText As String '-- E-mail text
Dim DelDate As Variant '-- Rec date for e-mail text
Dim stSubject As String '-- Subject line of e-mail
Dim stOrderID As String '-- The Order ID from form
Dim detailQry As String
Dim dQuery As String
Dim rs As DAO.Recordset
Set rs = Me![subformquestions subform].Form.RecordsetClone
While Not rs.EOF
dQuery = dQuery & rs![Brand Name].Value & vbTab & rs![Model Name].Value & vbTab & rs![Color].Value & vbCrLf
Wend
Set rs = Nothing
CstName = Me![Planner]
varTo = Me![Notes]
stSubject = ":: Second Check is Complete ::"
DelDate = Me.[WorkPackage]
stText = "Dear" & CstName & _
"Your Workpackage has been checked." & Chr$(13) & Chr$(13) & _
"Please refer to your WPP Questions " & Chr$(13) & _
"WPP Number: " & DelDate & Chr$(13) & Chr$(13) & _
dQuery & Chr$(13) & _
"This is an automated message. Please do not respond to this e-mail."
'Write the e-mail content for sending to assignee
DoCmd.SendObject , , acFormatTXT, varTo, , , stSubject, stText, True
Err_cmdEmailList_Click:
MsgBox Err.Description
End Sub