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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top