I have a multiselect listbox on a form, and a command button which brings up a record detail form. If the user selects only one item in the listbox it works great. If the user selects multple items in the listbox, it shows the LAST record selected. I would like to show the FIRST record selected. How can I specify the first selected item?
Here's the code behind my command button:
Ultimately, on frmDetail I would like to include buttons that will navigate through the selected items in the listbox. For now, I'm just trying to get to the first selected item.
Thanks,
Sup
Here's the code behind my command button:
Code:
Private Sub cmdViewDetail_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmDetail"
stLinkCriteria = "[RecID] = " & Me.lstRecords.Column(0)
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
Ultimately, on frmDetail I would like to include buttons that will navigate through the selected items in the listbox. For now, I'm just trying to get to the first selected item.
Thanks,
Sup