Hello almighty Access Gurus.
I'm in a bit of a tough spot and the solution to this problem has just been eluding me for over a week.I'm hoping someone can help me.
On a form, I have two combo boxes. They are called cbotopics and cbosources. I have what appears in cbosources limited by what is selected in cbotopics. I am using this visual basic code to do it.
Now below those two combo boxes, I have a text box. (tbnotes)Private Sub cbotopics_AfterUpdate()
Me.cbosources.RowSource = "SELECT source FROM" & _
" SourceNotes WHERE topic = " & Me.cbotopics & _
" ORDER BY Source"
Me.cbosources = Me.cbosources.ItemData(0)
End Sub
I would like tbnotes to display information based on what is selected in cbosources.
How? I've tried to do some VB code like this:
but I keep receiving errors.Private Sub cbosources_AfterUpdate()
Me.tbnotes.RowSource = "SELECT notes FROM" & _
" SourceNotes WHERE source = " & Me.cbosources & _
" ORDER BY Source"
Me.tbnotes = Me.cbosources.ItemData(0)
End Sub
Help!
P.S I have all the needed information setup in a table called SourceNotes.