J
Jen Preston via AccessMonster.com
I need my list box to populate with records belonging to my combo drop
down. The drop down is based on companyid. My code is not working. The
list box is always blank. Here's my code:
Private Sub Combo170_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Companyid] = " & Str(Nz(Me![Combo170], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Dim sFilter As String
sFilter = [CompanyName]
Me!Label90.Caption = sFilter
Me!List195.RowSource = [Companyid]
End Sub
In my query of the "list195" I have the following on companyid:
[Forms]![frmEdit]![Combo170]
down. The drop down is based on companyid. My code is not working. The
list box is always blank. Here's my code:
Private Sub Combo170_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Companyid] = " & Str(Nz(Me![Combo170], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Dim sFilter As String
sFilter = [CompanyName]
Me!Label90.Caption = sFilter
Me!List195.RowSource = [Companyid]
End Sub
In my query of the "list195" I have the following on companyid:
[Forms]![frmEdit]![Combo170]