-----Original Message-----
I made a list box that filter queries the total records
in a subform. How do I program it so I can select a
record in the list box and then have the subform go
directly to that record. As it stands now, I can only
visulaize the list of records, not activate them.
Supposing that you have a form TheNameOfYourForm with a
listbox List0 on it and a command button next to it named
cmdShowRecord then:
Private Sub cmdShowRecord_Click()
'Find the selected record then close the dialog box
Dim rst as DAO.Recordset
'Store the recordset for your form
Set rst = Forms!TheNameOfYourForm.RecordSetClone
'Locate the selected record
rst.FindFirst "YourEntryID = " & List0
'Set the form's bookmark property to move to the record
Forms!TheNameOfYourForm.Bookmark = rst.Bookmark
'Close the dialog box
DoCmd.Close acForm, "TheNameOfYourForm"
End Sub>
I hope it works for you, George