I need a listbox to instantly populate with data after a value is choosen from a combo box, both combo and listbox reside on the same form.
The code below produces no errors, no results in list box.
SQL produces results in an access query so I know it works.
The code below produces no errors, no results in list box.
SQL produces results in an access query so I know it works.
Code:
Private Sub cbo_Listing_AfterUpdate()
Dim varName As String
Dim rec1 As New ADODB.Recordset
Dim con1 As New ADODB.Connection
Set con1 = CurrentProject.Connection
sqlstr = " SELECT tbl_Services.ServicesName " & _
" FROM tbl_Programmers, tbl_Services " & _
" WHERE tbl_Programmers.ProgrammerID = tbl_Services.ProgrammerID " & _
" AND tbl_Programmers.ProgrammerID = " & Me.cbo_Listing.Column(1) & _
" ORDER BY tbl_Services.ServicesName "
Me.lst_Services.RowSource = sqlstr
End Sub