[AccessD] Transfer Spreadsheet

accesspro at cox.net accesspro at cox.net
Sun Oct 7 23:29:56 CDT 2018


To be clear the method works, just not able to create a new excel file......

This Works as long as I have the excel file in the folder:
 'DoCmd.TransferSpreadsheet acExport, 10, "tblTimeCard", "C:\A-Best
Systems\TimeOutput.xlsx", True

None of these will work. I guess because the file does not exist:
DoCmd.OutputTo acOutputQuery, "qryOutputOldLargeReorderDays", acFormatXLSX,
"C:\A-Best Systems\TimeOutput " & strDateToday & " PayPeriod " &
strJobPeriod & ".xlsx"
DoCmd.TransferSpreadsheet acExport, 10, "qryOutputOldLargeReorderDays",
"C:\A-Best Systems\TimeOutput " & _
    strDateToday & " PayPeriod " & strJobPeriod & ".xlsx", True


tia

bob


-----Original Message-----
From: AccessD <accessd-bounces at databaseadvisors.com> On Behalf Of Darryl
Collins
Sent: Sunday, October 7, 2018 8:42 PM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] Transfer Spreadsheet

Any chance you can post the relevant code segment? 

You should be able to do this seamlessly so curious to see what is going on.

Cheers
Darryl.



-----Original Message-----
From: AccessD <accessd-bounces at databaseadvisors.com> On Behalf Of
accesspro at cox.net
Sent: Monday, 8 October 2018 2:11 PM
To: 'Access Developers discussion and problem solving'
<accessd at databaseadvisors.com>
Subject: [AccessD] Transfer Spreadsheet

I am using the transfer spreadsheet method and am able to successfully
export my data.
What would be a bonus is for me to create a new excel file each time with a
unique file name.
When I include such vba code, I get an error "Not a valid file name".
I want to NOT use my existing "template" excel file.
Maybe not possible with this method ??

TIA

Bob



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list