Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transferspreadsheet 1

Status
Not open for further replies.

bustersports

Programmer
Sep 25, 2002
92
US
Hi,

I am trying to have code that allow the user to transfer a spreadsheet and not have to fill in the path and file name each time. The file name changes on a daily basis (Data 07-08-10.xlsx yesterday Data 07-09-10.xlsx today). I have built the form to read from a table the path name and file name. But Access returns an error that it cannot find the path I am referencing. Below is the code I am using. The
txtCombinedPathCurrent equals the path for today's file (ex
v:\Contracting Docs\GTOP Adden C\Pricing File DARRTS Current DZNA 07-09-10.xlsx). I have tried it with and without the date, same error results.

DoCmd.TransferSpreadsheet acImport, 10, "Test", "frmImportData!subfrmImportData!txtCombinedPathCurrent", False, ""

Thanks for your time.
 
DoCmd.TransferSpreadsheet acImport, 10, "Test", Forms!frmImportData!subfrmImportData.Form!txtCombinedPathCurrent, False, ""

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV. It was nice to see such a quick response, worked perfectly. Very much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top