Albert24
07-16-2008, 08:26 PM
I am having a problem using old code in Access Pro 2007.
This is the code I am using in Access 2003 without any problems but when I try this code in Access Pro 2007. I receive an error message.
Function Macro1()
On Error GoTo Macro1_Err
DoCmd.TransferSpreadsheet acExport, 8, "Payment Audit_1", "c:\testing\Audit.xls", False, ""
DoCmd.TransferSpreadsheet acExport, 8, "Vending Audit_2", "c:\testing\Audit.xls", False, ""
DoCmd.TransferSpreadsheet acExport, 8, "Coolers Audit_3", "c:\testing\Audit.xls", False, ""
Macro1_Exit:
Exit Function
Macro1_Err:
MsgBox Error$
Resume Macro1_Exit
End Function
Can someone help? Thanks in advance.
This is the code I am using in Access 2003 without any problems but when I try this code in Access Pro 2007. I receive an error message.
Function Macro1()
On Error GoTo Macro1_Err
DoCmd.TransferSpreadsheet acExport, 8, "Payment Audit_1", "c:\testing\Audit.xls", False, ""
DoCmd.TransferSpreadsheet acExport, 8, "Vending Audit_2", "c:\testing\Audit.xls", False, ""
DoCmd.TransferSpreadsheet acExport, 8, "Coolers Audit_3", "c:\testing\Audit.xls", False, ""
Macro1_Exit:
Exit Function
Macro1_Err:
MsgBox Error$
Resume Macro1_Exit
End Function
Can someone help? Thanks in advance.