I have an unbound list box that is found in a SubForm. I want to use the following code to open a details box so a user can edit that list item in...Detail.
For some reason my code is not working I attempted to follow the article in this link: http://www.databasedev.co.uk/list_box_searching.html with no luck.
To provide more information:
Main form = frmAphpgCapacity
Subform = frmAphBedslot
Unbound list is found inside frmAphBedslot and pulls records based on the main form.
For some reason my code is not working I attempted to follow the article in this link: http://www.databasedev.co.uk/list_box_searching.html with no luck.
Code:
Private Sub lstMon_DblClick(Cancel As Integer)
'If the user double-clicks in the list open the details frm
If Not IsNull(lstMon) Then
DoCmd.OpenForm "frmAphBedSlotDetail", , , _
"[tblBedSlot.id]=" & _
"'" & Me.lstMon.Column(0) & "'"
End If
End Sub
To provide more information:
Main form = frmAphpgCapacity
Subform = frmAphBedslot
Unbound list is found inside frmAphBedslot and pulls records based on the main form.
Last edited: