Error: Could not find installable ISAM

Karim Vazirinejad 186 Reputation points
2021-05-25T14:19:13.883+00:00

I have a software in Access that is microsoft 365. I want to open a table in another Access database and show some of information of this table in my form. I want to use ADO.
But when I execute my code, I get the error: Could not find installable ISAM.

I don't know why?

99553-error.png

Private Sub cmdGetConnectionInfo_Click()  
'get the information of server from the connection Database  
  
    Dim cn As ADODB.Connection  
    Dim rs As ADODB.Recordset  
    Dim strConnection As String  
      
    'Specify the connection string for connecting to connection database  
     strConnection = "Provider=Microsoft.ACE.OLEDB.16.0;" & _  
     "DataSource=" & "J:\Kraseh\ConnectionInfo.accdb;"  
    'Create a new connection instance and open it using the connection string  
    Set cn = New ADODB.Connection  
    cn.Open strConnection  
      
    'Create a new instance of a recordset  
    Set rs = New ADODB.Recordset  
    'set various properties of the recordset  
    With rs  
        'specify a cursor type and lock type that will allow updates  
        .CursorType = adOpenKeyset  
        .CursorLocation = adUseClient  
        .LockType = adLockOptimistic  
        'open the recordset based on tblConnection table using the existing connection  
        .Open "tblConnectionInfo", cn  
    End With  
      
    'if the recordset is empty  
    If rs.BOF And rs.EOF Then  
        MsgBox "ÏÑ ÌÏæá ÊäÙíãÇÊ ÏÇÏå Çí æÌæÏ äÏÇÑÏ", vbOKOnly + vbMsgBoxRight + vbMsgBoxRtlReading, "ÎØÇí ÏÇÏå"  
        Exit Sub  
    'if the recordset is not empty,then bind the recordset property of form to the rs recordset  
    Else  
        Set Me.Recordset = rs  
    End If  
      
    'bind the controls of the form to the proper fields in the recordset  
      
    Me.txtID.ControlSource = "ID"  
    Me.txtServer.ControlSource = "Server"  
    Me.txtPort.ControlSource = "Port"  
    Me.txtDataBaseName.ControlSource = "DataBaseName"  
    Me.txtUserName.ControlSource = "UserName"  
    Me.txtPassword.ControlSource = "Password"  
    Me.chkTrustedConnection.ControlSource = "TrustedConnection"  
      
          
      
      
End Sub  
Microsoft 365 and Office | Access | Development
Developer technologies | Visual Basic for Applications
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tom van Stiphout 1,861 Reputation points MVP Volunteer Moderator
    2021-05-26T01:19:21.11+00:00

    If you then click Debug, what line is highlighted?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.