I am converting an old database that was from Access 2002 to Access 2007. Everything has gone well and I'm at the final point. The problem I have run into is with a function in VBA that is no longer valid in Access 2007. It is something like this:
From what I gather, outputting a report directly to Excel is no longer an included function in Access 2007. The problem is I have a bunch of reports and the user can select if they want to export them to Excel. Is there a simple way to do this?
Code:
Select Case ReportName
Case "Report1"
'some code
Case "Report2"
'some code
Case "Report3"
'some code
End Select
txt = InputBox("Enter file name:", , "C:\ExcelFiles\" & ReportName & "_" & Format(Date, "yyyymmdd") & ".xls")
DoCmd.OutputTo acOutputReport, ReportName, acFormatXLS, txt
From what I gather, outputting a report directly to Excel is no longer an included function in Access 2007. The problem is I have a bunch of reports and the user can select if they want to export them to Excel. Is there a simple way to do this?