On my main user form, I have a command button that brings up a dialog box with a list of all the names in the recordset. Selecting a name in the list box and clicking ShowRecord is supposed to take the user to the selected record, but instead it always displays the same record in the recordset regardless of which name is selected. Here is the code for the ShowRecord command button that is sets my main form to the selected record:
Private Sub ShowRecord_Click()
' Find the selected record, then close the dialog box.
Dim rst As DAO.Recordset
' Store the recordset for the Subscribers form.
Set rst = Forms!frmMain.RecordsetClone
' Locate the record for the selected subscriber.
rst.FindFirst "MemberID = " & List0
' Set the form's Bookmark property to move to the record.
Forms!frmMain.Bookmark = rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "GoToRecordDialog"
End Sub
Any help will be much appreciated.
Private Sub ShowRecord_Click()
' Find the selected record, then close the dialog box.
Dim rst As DAO.Recordset
' Store the recordset for the Subscribers form.
Set rst = Forms!frmMain.RecordsetClone
' Locate the record for the selected subscriber.
rst.FindFirst "MemberID = " & List0
' Set the form's Bookmark property to move to the record.
Forms!frmMain.Bookmark = rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "GoToRecordDialog"
End Sub
Any help will be much appreciated.