How to populate a ListBox with a ADODB.Recordset (Error 91) To Do Autocompletion in Access
I work on an Access DB and I have to use a Datasource connection to a SQL Server. To do that I use the ADODB object with : -ADODB.Connection -ADODB.Recordset Code Up-to-date, following an observation of Ian Kenney Dim cnn As ADODB.Connection Set cnn = New ADODB.Connection Dim rs As ADODB.Recordset cnn.ConnectionString = "driver={SQL Server};provider=SQLOLEDB;server=10.****;uid=****readonly;pwd=****readonly;database=****" cnn.Open Set rs = cnn.Execute("SELECT [MATRI], [NOMPRE] FROM SCHEME_DB.TABLE WHERE NOMPRE LIKE '*" & Me.Textbox_recherche.Text & "*'") Me.Liste_choix.RowSourceType = "Table