Move through a list box.
- From: "Jarryd" <Jarryd@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Sep 2005 10:16:54 +0100
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
.
- Follow-Ups:
- Re: Move through a list box.
- From: Ron Weiner
- Re: Move through a list box.
- Prev by Date: Re: Very strange mdb corruption issue
- Next by Date: open a form for a particular result of list
- Previous by thread: Re: Find record based on PK in Subform
- Next by thread: Re: Move through a list box.
- Index(es):