S
smcgrath via AccessMonster.com
I have the following code on a command button to e-mail the names on the
subform but I a runtime error 3021 no current record. I cannot figure out
why when I know that there are records on the subform.
Private Sub Command37_Click()
Dim rs As DAO.Recordset
Set rs = Me.FrmSubRealtors1.Form.RecordsetClone
Dim tostr As String
With rs
Do Until RecordsetClone.EOF
If Not IsNull(!) Then
tostr = tostr & "," & ![Email]
End If
.MoveNext
Loop
.Close
End With
Set rs = Nothing
DoCmd.SendObject acSendNoObject, , , tostr, , , "Test", , , False
End Sub
subform but I a runtime error 3021 no current record. I cannot figure out
why when I know that there are records on the subform.
Private Sub Command37_Click()
Dim rs As DAO.Recordset
Set rs = Me.FrmSubRealtors1.Form.RecordsetClone
Dim tostr As String
With rs
Do Until RecordsetClone.EOF
If Not IsNull(!) Then
tostr = tostr & "," & ![Email]
End If
.MoveNext
Loop
.Close
End With
Set rs = Nothing
DoCmd.SendObject acSendNoObject, , , tostr, , , "Test", , , False
End Sub