Karen Schaefer
asked on
Export Access 2010 report as XPS file type via Code
I have created a button on form to export a report and save report to specified file location, however, the file does not seem to be there after running the code. When I Manual export the file as XPS type it works great. What am I missing?
I have tried for True and false to display the results. Neither seem to give me the correct results.
Private Sub cmdExportReq_Click()
On Error GoTo cmdExportReq_Click_Err
DoCmd.OutputTo acOutputReport, "rptRequirementMainQuestions", acFormatXPS, "Z:\Access Database Design\Requirement Documentation\RequirementMain.xps", True
cmdExportReq_Click_Exit:
Exit Sub
cmdExportReq_Click_Err:
MsgBox Error$
Resume cmdExportReq_Click_Exit
End Sub
I have tried for True and false to display the results. Neither seem to give me the correct results.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER