Link combobox with access table using VB 6 - TechRepublic
Question
December 4, 2008 at 09:36 PM
abbas_kashif2003

Link combobox with access table using VB 6

by abbas_kashif2003 . Updated 17 years, 7 months ago

Hi,

I am trying to connect combobox with access table to call some data on combobox below is the code which i have used but there is some problem with the code.
can any plz help me where i am going wrong

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
cn.ConnectionString = “provider=Microsoft.Jet.OLEDB.4.0;data source=” & App.Path & “\contract_management.mdb”
cn.Open
cn.CursorLocation = adUseClient
rs.Open “select client_name from masterdata”, cn, adOpenDynamic, adLockOptimistic

With rs
While rs.EOF
Combo1.AddItem
.MoveNext
Wend
End With

This discussion is locked

All Comments