I'm an Access newb in need of some help!
I have a list box which lists names of companies. I'd like to be able to double click a name and then the event handler should open up the correct form for the company. The event handler of the list box is (I know the naming is bad but this is only for some testing and thus not for production):
What happens though is that the "Enter Parameter Value" window pops up when I double click a name in the list box. If I then enter the company's name in this window, the correct form opens. Why does this window pops up?
I have a list box which lists names of companies. I'd like to be able to double click a name and then the event handler should open up the correct form for the company. The event handler of the list box is (I know the naming is bad but this is only for some testing and thus not for production):
Code:
Private Sub List3_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLink As String
stDocName = "Companies"
stLink = Me!List3.Value
If IsNull(stLink) Then
MsgBox "Please double click on a company name."
Exit Sub
End If
stLink = "[Company]= " & Me!List3.Value
DoCmd.OpenForm stDocName, , , stLink
End Sub
What happens though is that the "Enter Parameter Value" window pops up when I double click a name in the list box. If I then enter the company's name in this window, the correct form opens. Why does this window pops up?
Last edited: