Rachy222
asked on
Need Help with Excel Export with Access 97
I am exporting a table to an excel spreadsheet.
i want to export it to a path that i am typing in at txtOpenFile
here is what i have so far
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryContractsLbbExport", "LBB EXCEL EXPORT", True
i need to know where in the code to tell it to look at the path i have typed in in the txtOpenFile text box
thanks
i want to export it to a path that i am typing in at txtOpenFile
here is what i have so far
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "qryContractsLbbExport", "LBB EXCEL EXPORT", True
i need to know where in the code to tell it to look at the path i have typed in in the txtOpenFile text box
thanks
ASKER
i had already tried that and it did not work,
any other ideas
any other ideas
ASKER
can someone please help!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!! !!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what error message where you given?
I can't see any reason for it not working?
Thanks
Jell
I can't see any reason for it not working?
Thanks
Jell
Here is a working example from my source code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryABC", strSaveFile, True
Where strSaveFile =
"V:\Reports\" & Format(Date, "mm-dd-yy") & " " & Forms![frmPipelineSelect]! [Combo6] & ".xls"
Hopefully you can take this and modify it to suit your needs.
Tom
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryABC", strSaveFile, True
Where strSaveFile =
"V:\Reports\" & Format(Date, "mm-dd-yy") & " " & Forms![frmPipelineSelect]!
Hopefully you can take this and modify it to suit your needs.
Tom
Points share Nico?
Dim expPath as string
expPath = me.txtOpenFile.text
DoCmd.TransferSpreadsheet (acExport, acSpreadsheetTypeExcel7, "qryContractsLbbExport", expPath & "Example.xls", true)
Or something like that.
Let me know if this helps.
Thanks
Jell