SendObject error

swb147

Registered User.
Local time
Today, 16:58
Joined
Jul 18, 2013
Messages
14
Hi I am a completley new to VBA so may be well out of my depth but here goes.

I am wanting to send a report as a text file by email to a recipient that has been selected from a combo box on a form, the report is called "prtGroupContactsbyWard"

The command I have used from scouring the internet is:

DoCmd.SendObject acSendReport, "rptGroupContactsbyWard", acFormatTXT, [forms]![frmReportGen]![Combo114], , , "Your Email Contacts", , ,

I get a error that says
Compile error:
Syntax error:

Can someone please help
Thanks
 
check that all the parameters you have set, make sense according to the intellisense you get. is the form open? that may be the issue.
 
swb147, just delete all the comma's following the Subject..

Also make sure your ComboBox RowSource si set properly.. i.e. Bound column is giving out the email address not the ID..
 

Users who are viewing this thread

Back
Top Bottom