Create a form, have a button to call some code...in the properties of the button under the 'Other' tab name the button "Email". Under the Event tab type [Event Procedure] in the On-Click event.
This code will email all the email addresses stored in a column of a table. Hope this gets you started...
Paste the following code into the VB window of the form:
Private Sub Email_Click()
On Error GoTo Err_Email_Click
Dim dbs As DAO.Database, rst As DAO.Recordset
Dim strEmail As String
Dim strDate As String
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("Table Name")
strDate = Date
With rst
'writes all the email addresses to a string
While Not .EOF
strEmail = strEmail & ![Column Name] & ";"
.MoveNext
Wend
DoCmd.SendObject , , , strEmail, , , "This is a TEST for Catahoulahound on the" & " " & "" & strDate & "", "This is an automated email directly sent from my database. If I set the end property to FALSE this email will send without viewing it before sending - Thankyou.", TRUE
.Close
End With
Set rst = Nothing: Set dbs = Nothing
Exit_Email_Click:
Exit Sub
Err_Email_Click:
MsgBox Err.Description
Resume Exit_Email_Click
End Sub
~Phil4tektips~
Grant us peace in our days work!