The idea would be to read the items of Listbox1 (one-by-one) and run a query (Listbox1 ->Field1) and display the result (Field2 -> Listbox3) in the same Listbox3.
For some reason, only appears in Listbox3 the result of the last item of Listbox1.
Dim con As New OleDb.OleDbConnection
con.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Persist Security Info = False; Data Source = | DataDirectory | \ db.mdb"
For Each item In ListBox1.Items
The dim cmd_sel OleDb.OleDbCommand con.CreateCommand = ()
cmd_sel.CommandText = "SELECT Field1, Field2 FROM WHERE Tabla Field1 LIKE '" & item & "'"
The Dim oledbReader OleDb.OleDbDataReader
con.Open ()
oledbReader cmd_sel.ExecuteReader = ()
While the oledbReader.Read ()
ListBox3.Items.Add (oledbReader.Item (1))
Loop
con.close ()
oledbReader.Close ()