Got to record using list box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I was able to create a litst box using a query taht only shows those records on the underlying form. How can I go to that record once I select it?
 
You could use the AfterUpdate event of the listbox to run code to move to
that record of the form.

Assuming that the listbox's bound column is the primary key field:

Private Sub ListBoxName_AfterUpdate()\
With Me.RecordsetClone
.FindFirst "[PrimaryKeyFieldName]=" & Me.ListBoxName.Value
Me.Bookmark = .Bookmark
End With
End Sub


--
Ken Snell
<MS ACCESS MVP>


Melissa said:
Hi, I was able to create a litst box using a query taht only shows those
records on the underlying form. How can I go to that record once I select
it?
 
Back
Top