J
Jarryd
Hi,
I have an unbound list box that is populated by a query. Clicking on a
value in the list box moves to the record in the recordset that matches the
value chosen in the list with a specified field:
Private Sub lstBill_List_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Bill] = '" & Me!lstBill_List & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Now that is working well. The next thing I have done is created a procedure
triggered by the Click event of a button to add a value to the table that is
queried to populate the list box. So the value is added and the list box
requeried. I have also got the form to move to the newly created record.
What I can't do is get the list box to move its position to the newly added
value. Does anyone know how you move through items in an unbound list box?
TIA,
Jarryd
I have an unbound list box that is populated by a query. Clicking on a
value in the list box moves to the record in the recordset that matches the
value chosen in the list with a specified field:
Private Sub lstBill_List_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Bill] = '" & Me!lstBill_List & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Now that is working well. The next thing I have done is created a procedure
triggered by the Click event of a button to add a value to the table that is
queried to populate the list box. So the value is added and the list box
requeried. I have also got the form to move to the newly created record.
What I can't do is get the list box to move its position to the newly added
value. Does anyone know how you move through items in an unbound list box?
TIA,
Jarryd