armstrong722
Technical User
this the code I'm using and when I try it, it sends out the first email and then says there isn't enough memory to perform this operation.
Any ideas would be much appreciated
Private Sub Email_Everyone_Click()
On Error GoTo Email_Everyone_Click_Err
Dim Db As Database
Set Db = CurrentDb
'this is hardwired with a query
Set Rst = Db.OpenRecordset("email minor tryouts", dbOpenDynaset)
'do the loop until all records are done
While Not Rst.EOF
subject = "Minor League Tryouts"
message = "See you there! Saturday March 23, 2002 9:00-11:00 This is for 7-9 year olds who have not been in Minor League before for a talent evaluation."
EmailList = Rst!email
DoCmd.SendObject acSendNoObject, , , EmailList, "", "", subject, message, False, ""
Rst.MoveNext
Wend
Email_Everyone_Click_Exit:
Exit Sub
Email_Everyone_Click_Err:
MsgBox Error$
Resume Email_Everyone_Click_Exit
End Sub
Any ideas would be much appreciated
Private Sub Email_Everyone_Click()
On Error GoTo Email_Everyone_Click_Err
Dim Db As Database
Set Db = CurrentDb
'this is hardwired with a query
Set Rst = Db.OpenRecordset("email minor tryouts", dbOpenDynaset)
'do the loop until all records are done
While Not Rst.EOF
subject = "Minor League Tryouts"
message = "See you there! Saturday March 23, 2002 9:00-11:00 This is for 7-9 year olds who have not been in Minor League before for a talent evaluation."
EmailList = Rst!email
DoCmd.SendObject acSendNoObject, , , EmailList, "", "", subject, message, False, ""
Rst.MoveNext
Wend
Email_Everyone_Click_Exit:
Exit Sub
Email_Everyone_Click_Err:
MsgBox Error$
Resume Email_Everyone_Click_Exit
End Sub