email module - wrong number of arguements

teiben

Registered User.
Local time
Today, 23:54
Joined
Jun 20, 2002
Messages
462
Help. I've done this before where a command button calls up module which sends a message to EmailAddress in tblEmail. But this time on form there are 3checkboxes, if box a is checked then the message is "checkbox a was checked", etc for b and c, then the module should run. Except when the module runs I get the error message "wrong # of Arguements, or invalid property assignment, on the SendObject line of code.

This is the code is the module:
ub OpenBla()
Dim rsEmail As DAO.Recordset
Dim strEmail As String

Set rsEmail = CurrentDb.OpenRecordset("tblEmail") 'table where email is
strEmail = rsEmail.Fields("EmailAddress").Value
rsEmail.MoveNext
Do While Not rsEmail.EOF
strEmail = strEmail & " ; " & rsEmail.Fields("EmailAddress").Value
rsEmail.MoveNext
Loop


'If Forms!frmEditEmail.Interim.Value = -1 Then
DoCmd.SendObject , , , strEmail, , , "test", , , False, ""MsgBox "E-Mail interim message has been sent"
End If

Any idea's
 
You have too many arguments. The only ones are:
Code:
DoCmd.SendObject [objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]
 

Users who are viewing this thread

Back
Top Bottom