Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Problems - Crashes Access 2000

Status
Not open for further replies.

roxannep

Technical User
Jun 20, 2000
69
Below is coade I'm using to send individual emails (recipient doesn't see everyone else's email in "to" field). Problem is it crashes Access 2000 after only one or two records are circulated through (the first record of the set). Any ideas .... perhaps I'm missing something in code. I was using this very successfully in '97, but it's been crashing since I moved it to Access 2000.

Private Sub cmdCustomerXmasEmail_Click()
Dim db As Database, rst As Recordset
Dim a As Integer, EmailInfo As String

Set db = CurrentDb()
Set rst = db.OpenRecordset("tblXmasEmail")

rst.MoveLast
rst.MoveFirst

For a = 1 To rst.RecordCount

EmailInfo = "Message here" & vbCrLf
EmailInfo = EmailInfo & vbCrLf
EmailInfo = EmailInfo & "Message Continued here" & vbCrLf
EmailInfo = EmailInfo & vbCrLf
EmailInfo = EmailInfo & "Thank you again for your business." & vbCrLf

DoCmd.SendObject acSendNoObject, " ", acFormatRTF, rst!EmailName, , , "Holiday Gift Certificate", EmailInfo, False, " "

rst.MoveNext
Next

DoCmd.Close

End Sub
 
Tried that. No luck, crashed without even sending one email this time.

Any other suggestions?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top