Results 1 to 2 of 2
  1. #1
    quicova is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    53

    Could not find installable ISAM. (Error 3170) help needed


    Hi eveyone.

    I'm trying to create a button on a form to link to a backend file.
    this is the code I have so far:

    Code:
    Function getFileNameOpen(path) As String
    
    
        Dim f    As Object
        Dim varFile As Variant
        
        Set f = Application.FileDialog(3)
        
        With f
            f.AllowMultiSelect = True   
            f.Filters.Clear
            f.Filters.Add "Access Databases", "*.accdb"
            f.Filters.Add "All Files", "*.*"
            
            If f.show = -1 Then
                For Each varFile In f.SelectedItems
                file = varFile
                Next varFile
            End If
        End With    
        path = file
    End Function
    This function opens a browser window to get the file path.

    Code:
    Function OpenFile()
        
        Call getFileNameOpen(path)
        
        Dim db As Database
        Dim td As TableDef
        Dim WS As Workspace
        Dim i As Integer
        Dim ListOfNames()
        
        i = 0
        ReDim ListOfNames(i)
        
        Set WS = CreateWorkspace("DBtoReadTables", "admin", "", dbUseJet)
        Set db = WS.OpenDatabase(path, True)
    
    
        For Each td In db.TableDefs
            If Left(td.name, 4) <> "MSys" Then
                ListOfNames(i) = td.name
                i = i + 1
                ReDim Preserve ListOfNames(i)
            Else
            End If
        Next td
    
    
        db.Close
        Set db = Nothing
        Set WS = Nothing
        
        Dim dbsTemp As Database
        Dim strMenu As String
        Dim strInput As String
        Dim tbname As Variant
        Dim name As String
        
        Set dbsTemp = CurrentDb
        
        For Each tbname In ListOfNames
            name = tbname
            ConnectOutput dbsTemp, _
                name, _
                Database = path, _
                name
        Next
            
    End Function
    
    
    Sub ConnectOutput(dbsTemp As Database, _
       strTable As String, strConnect As String, _
       strSourceTable As String)
    
       Dim tdfLinked As TableDef
    
    
       Set tdfLinked = dbsTemp.CreateTableDef(strTable)
       
       tdfLinked.Connect = strConnect
       tdfLinked.SourceTableName = strSourceTable
       dbsTemp.TableDefs.Append tdfLinked
    
    End Sub

    this open gets the name of all the tables an puts them into an array
    them loops through the array to link each table name

    I can't figure out what is wrong
    Can someone help me out please

  2. #2
    quicova is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    53
    Fixed it.

    problem was in the code here:

    Code:
    For Each tbname In ListOfNames
            name = tbname
            ConnectOutput dbsTemp, _
                name, _
                Database = path, _
                name
        Next
    should be:
    Code:
    For Each tbname In ListOfNames
    name = tbname
    ConnectOutput dbsTemp, _
    name, _
    ";DATABASE=" & path, _
    name
    Next

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Could not find installable isam
    By Gee in forum Access
    Replies: 0
    Last Post: 03-14-2013, 11:58 AM
  2. ISAM not found
    By amerifax in forum Access
    Replies: 2
    Last Post: 02-02-2013, 06:48 PM
  3. Replies: 12
    Last Post: 09-14-2012, 04:59 PM
  4. On error go to advice needed
    By AndycompanyZ in forum Programming
    Replies: 6
    Last Post: 06-24-2011, 04:49 AM
  5. Replies: 0
    Last Post: 06-29-2010, 07:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums