I have a very simple form that has one button. All I want it to do is export some data. Here is the code that I have:
Private Sub Command3_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qyrEmployeeExport", "c:\EmployeeExport.xls"
End Sub
Private Sub Form_Load()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qyrEmployeeExport", "c:\EmployeeExport.xls"
End Sub
I have put the code in 2 places just to see if it was reaching it but in both cases the execution would never break.
How can I get the code to be executed?
I am using MS Access 2007.
Thanks.
BTW, I don't know which type of button to use so I canceled the wizard and left the button on the form.
Private Sub Command3_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qyrEmployeeExport", "c:\EmployeeExport.xls"
End Sub
Private Sub Form_Load()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qyrEmployeeExport", "c:\EmployeeExport.xls"
End Sub
I have put the code in 2 places just to see if it was reaching it but in both cases the execution would never break.
How can I get the code to be executed?
I am using MS Access 2007.
Thanks.
BTW, I don't know which type of button to use so I canceled the wizard and left the button on the form.