I want to populate combo box with particular field value of a table in ms access.
datafile = "D:\database.accdb"
With cn
.Provider = "microsoft.ACE.OLEDB.12.0"
.ConnectionString = datafile
End With
cn.Open
Set rs = cn.Execute("select * from mytable")
Do Until rs.EOF
combo1.AddItem rs!name
rs.MoveNext
Loop
cn.Close
I am getting runtime error 3705 provider of object connection failed