Code:
Private Sub LstBox_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "SelectionForm"
stLinkCriteria = "[IDNUM]=" & Me![LstBox]
[B][U]DoCmd.OpenForm stDocName, , , stLinkCriteria[/U][/B]
End Sub
ive got a list box that when you double click it runs this code,
which basically should open the form "SelectionForm" at the correct id number
But i get
Run-time errror `2501`
The openform action was canceled
WHAT AM I DOING WRONG AAAARrrrrh