DoCmd.SendObject

S

SG

I have adapted the code below to allow the report to be email to someone but
I am experiancing a problem which is linked to strWhere statement, now that
I have adapted this were should the StrWhere statement be?



Private Sub Command8_Click()

Dim ReportName As String
Dim strWhere As String

ReportName = "SalesReport1"

strWhere = "InvoiceDate Between #" & _
Format(Me.Startdate, "mm/dd/yyyy") &"#" & _
" and #" & Format(Me.EndDate, "mm/dd/yyyy") & "#"

DoCmd.SendObject acReport, ReportName, strWhere
End Sub


Any suggestions would be gratefuly recieved.

Thanks

S
 
Top