L
Lee Taylor-Vaughan
hello group,
I have an unbound form, with a list box (lstDispmain) on it. the primary key
tothe list box is controlnumberID.
I want to be able to double click a single entry on the list box and open up
that record. how can i do this by referring to the controlnumberID in the
listbox, and opening that form?
the code below opens a blank record.
thanks in advance
lee
CODE:
Private Sub cmdOpenMission_Click()
On Error GoTo Err_cmdOpenMission_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmActivity"
stLinkCriteria = "[ControlNumberID]=" & "'" & Me![lstDispMain] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenMission_Click:
Exit Sub
Err_cmdOpenMission_Click:
MsgBox Err.Description
Resume Exit_cmdOpenMission_Click
End Sub
I have an unbound form, with a list box (lstDispmain) on it. the primary key
tothe list box is controlnumberID.
I want to be able to double click a single entry on the list box and open up
that record. how can i do this by referring to the controlnumberID in the
listbox, and opening that form?
the code below opens a blank record.
thanks in advance
lee
CODE:
Private Sub cmdOpenMission_Click()
On Error GoTo Err_cmdOpenMission_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmActivity"
stLinkCriteria = "[ControlNumberID]=" & "'" & Me![lstDispMain] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenMission_Click:
Exit Sub
Err_cmdOpenMission_Click:
MsgBox Err.Description
Resume Exit_cmdOpenMission_Click
End Sub