Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VBA error when importing Excel 2010 file

Posted on 2014-11-05
2
Medium Priority
?
564 Views
Last Modified: 2014-11-05
I am receiving Run-time error '3170': Could not find installable ISAM when attempting to import an Excel 2010 file (.xlsx) into an Access 2010 database using this code:

Private Sub ImportSurveyP_Click()
If IsNull(Me.txtFileName) Or Len(Me.txtFileName & "") = 0 Then
    MsgBox "Please select the Excel file"
    Me.ImportSurveyP.SetFocus
    Exit Sub
End If

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel14, "data_Flow", Me.txtFileName, True

End Sub

Open in new window


The error is with the TransferSpreadsheet line and I think it relates to the acSpreadsheetType.

I also tried acSpreadsheetType21Xml (as suggested elsewhere) in addition to acSpreadsheetType14 and this gives the same error.

Suggestions for what else I can try?
0
Comment
Question by:dougf1r
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 40424499
try

DoCmd.TransferSpreadsheet acImport, 10, "data_Flow", Me.txtFileName, true
0
 
LVL 1

Author Comment

by:dougf1r
ID: 40424595
Worked great. Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question