Let me just show you this,
this is the code I have got,
VB Code:
Dim ADOCn As ADODB.Connection
Dim ConnString As String
Dim adoRS As ADODB.Recordset
Dim sSQL As String
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\Chris\My Documents\VB Logbook\ADO\logbook.mdb;" & _
"Persist Security Info=False"
Set ADOCn = New ADODB.Connection
ADOCn.ConnectionString = ConnString
ADOCn.Open ConnString
Set adoRS = New ADODB.Recordset
'it doesnt look like you need a specific WHERE clause for this situation
'however, if you did it would look something like
'WHERE fieldname = 'Chris'
sSQL = "SELECT ID, [Callsign/Station] FROM tbl_master WHERE [Callsign/Station] = '" & List1.List(List1.ListIndex) & "' "
adoRS.Open sSQL, ADOCn
Combo2.Text = adoRS.Fields.Item("ID").Value
combo1.Text = adoRS.Fields.Item("Callsign/Station").Value
adoRS.Open sSQL, ADOCn
Do Until adoRS.EOF
List1.AddItem adoRS.Fields.Item("Callsign/Station").Value
List2.AddItem adoRS.Fields.Item("ID").Value
adoRS.MoveNext
Loop
adoRS.Close
ADOCn.Close
Set ADOCn = Nothing
Set adoRS = Nothing
Is there anything wrong with it?