Hi all I am trying to create a button that, when clicked, opens a file dialog so the user can choose where to have "tbl_Transaction_Master" exported from Access as an Excel spreadsheet.
I am getting the following error when I try and export the Excel doc to my desktop (my desktop folder is not open and I have tested it with other folders too):
"
Run-time error '3051':
The Microsoft Access database enginer cannot open or writ to the file 'C:\Users\Lizi\Desktop'. It is alread opened exclusively by another user,or you need permission to view and write its data.
"
The error occurs at the following line of code:
However, when I check my permissions properties for my Desktop folder, as the pic below shows, I do have read and write permissions. Hope someone can help
I am getting the following error when I try and export the Excel doc to my desktop (my desktop folder is not open and I have tested it with other folders too):
"
Run-time error '3051':
The Microsoft Access database enginer cannot open or writ to the file 'C:\Users\Lizi\Desktop'. It is alread opened exclusively by another user,or you need permission to view and write its data.
"
The error occurs at the following line of code:
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, dbTable, xlWorksheetPath, True
However, when I check my permissions properties for my Desktop folder, as the pic below shows, I do have read and write permissions. Hope someone can help