I want to be able to open a pop-up form by double clicking a list box (IndexHelpList) and a Help Form (frmHelpContent) opens and shows the help for that field that is double-clicked in the List Box (IndexHelpList). The list box displays field names 'FieldName' in the query behind the list box.
The way I have it set up now, the pop-up form Help Content form opens, but no matter what Field Name on double-click on in the List Box, the same help content opens every time.
This is what I've got:
Private Sub HelpIndexList_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
Dim HelpVal As String
HelpVal = Nz(DLookup("[HelpContent]", "tblHelp", "[FieldName] = '" & Me![HelpIndexList].ItemData(0) & "'"))
DoCmd.OpenForm "frmHelpContent", WindowMode:=acDialog, OpenArgs:=HelpVal
Private Sub Form_Open(Cancel As Integer)
Me.helpbox.Value = OpenArgs
Me.helpbox.SelLength = 0
What am I doing wrong?