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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top