Export Report with Graph to Excel error 2495

May 28, 2016
Reaction score
Hi, I'm beginner in coding and Access. I have to export Report with a graph into Excel, but I'm getting this error 2495 ' The action or method required a Table Name argument.' below should be my code that I using right now. I hope to find any solution, that could help me in my project.

Private Sub Command10_Click()
Dim reportname As String
Dim theFilePath As String
reportname = "Report1"
theFilePath = "C:\Users\DDPP\Desktop\"
theFilePath = theFilePath & reportname & "_" & Format(Date, "yyyy-mm-dd") & ".xls"

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel11, Report1, theFilePath, True
End Sub


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

Similar Threads