Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2005

Tip: Looking for answers? Try searching our database.

OutPutTo Code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Melissa - 22 Mar 2005 22:21 GMT
I am using Access 2003 for my database and have code written to export data
into excel, the following code works in my program:  

Private Sub ExportBtn_Click()
On Error GoTo ExportBtn_Click_Err
Call RetrieveBtn_Click
   
   DoCmd.OutputTo acQuery, "qryQuickQueryCrosstab",
"MicrosoftExcelBiff8(*.xls)", "", True, "", 0

However when I try to run the database on a computer with a older version of
access the data will not export.  Is there something wrong with the code or
are the older versions just not compatible?
JaRa - 23 Mar 2005 10:57 GMT
Why don't you use

docmd.TransferSpreadsheet acExport ,acSpreadsheetTypeExcel5
,"YourQueryName","YourFilename",true

you can also change acSpreadsheetTypeExcel5 in other versions of excel but i
recommend this one for general compatibility

- Raoul

> I am using Access 2003 for my database and have code written to export data
> into excel, the following code works in my program:  
[quoted text clipped - 9 lines]
> access the data will not export.  Is there something wrong with the code or
> are the older versions just not compatible?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.