Solved

Transfer spreadsheet error

Posted on 2014-01-21
2
451 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 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
add the file name


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

Author Closing Comment

by:Stephen Byrom
Comment Utility
Bloody ell!
Silly me.
Thanks for your time
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now