Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Property not found: DoCmd.TransferSpreadSheet

66 views
Skip to first unread message

chris seiter

unread,
Dec 26, 2007, 2:43:02 PM12/26/07
to
XP, Office 2007
I've got a table I need to export to Excel and the only solution I saw was
TransferSpreadsheet. Below is what I came up with(with help from the
Scripting Guys archives):

Sub Create_Excel_Export()
Dim strReportName As String
Dim strChooseLocation As String
Dim strLocationSave As String
Const acExport = 1
Const acSpreadsheetTypeExcel9 = 9
strReportName = Month(Date) & "-" & Day(Date) & "-" & (Right(Year(Date), 2))
& ".xls"
strChooseLocation = InputBox("Where would you like to save the report?",
"Save Location")
If Right(strChooseLocation, 1) = "\" Then
Else
strChooseLocation = strChooseLocation & "\"
End If
If InStr(1, strChooseLocation, " ", vbTextCompare) Then
strChooseLocation = Chr(34) & strChooseLocation & Chr(34)
Else
End If
strLocationSave = strChooseLocation & strReportName
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"tbTemp_Table_From_qrToBeFilled3_Copy_By_Chris", strLocationSave, True
End Sub

It tells me that there is a "runtime 3270:property not found" error. I've
tried creating the excel spreadsheet ahead of time, and that doesn't work.
I've double checked spelling and everything is spelled correctly. What could
I be missing?

chris seiter

unread,
Dec 26, 2007, 4:46:01 PM12/26/07
to
Solved.

deeptijain

unread,
Oct 1, 2008, 8:37:38 AM10/1/08
to
Hi,

I have migrated the database from Access 2003 to Access 2007.
I am exporting the data from Access Report to the Excel 2007.I am getting the Error while using the command which is mentioned below and the error is "Error 3270 Reserved Error"

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, QueryName, ReportFileName, True

It is prompting a widow while exporting the data and asking about the parameters for the report which is not having the records.If the record is there in the report it is exporting the data successfully.
Please advice.

Thanks & Regards,
Deepti Jain

0 new messages