I have been working on this application and im stuck now at a spot where i want to be able to click a button and have a combo box populate with text from a field in a access database where another field on the same record should be equal to a text item in another combo box.
somewhat like a sql statement like. SELECT [Title] From Books Where [Teacher] = teachers.text
I dont know sql or VB very well I'm teaching myself so if my examples are a bit off I'm sorry.
this is the code in VB that i tried
Private Sub see_Click()
'rs is Record set inside of a database that is previously set.
'teachers and books are both combo boxs
Do While Not rs.EOF
books.AddItem (rs!Titles(Where(rs!Teacher = teachers.Text)))
rs.MoveNext
Loop
End Sub
it keeps giving me error at rs!Teacher anyone understand me or can help?