Solved

Transfer spreadsheet error

Posted on 2014-01-21
2
455 Views
Last Modified: 2014-01-21
Hi,
I have been transferring query results for the past year using the transfer spreadsheet routine. I have written a new one for a new query and all of a sudden it wont let me transfer the data saying that the destination folder is not available or already open! Not true. I even simplified the destination to my desktop on my laptop to see if that solved it but to no avail. the code is this;

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryProdRprt", "C:\Users\StevieB\Desktop"

DoCmd.OutputTo acOutputReport, "rptShiftRptNow", acFormatPDF, "C:\Users\StevieB\Desktop"

it stops at the transfer spreadsheet line saying it cannot write to the file "C:\Users\StevieB\Desktop" it is already opened exclusively by another user, or I need permission to view and write it's data.
???

Any help as always is much appreciated.
Thanks
0
Comment
Question by:Stephen Byrom
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39797855
add the file name


DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryProdRprt", "C:\Users\StevieB\Desktop\myExcel.xls"
0
 
LVL 1

Author Closing Comment

by:Stephen Byrom
ID: 39798227
Bloody ell!
Silly me.
Thanks for your time
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access vs. Filemaker Pro vs. SQL Server 4 59
SQL Select in Access 2003 3 23
Gracefully handling 'Record Locked'  Errors 33 34
Comparison query - 4 columns 9 22
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question