I have a list box on a form and want to do the following:
1) If the user double-clicks on a specific record in the listbox, have a 2nd form open right to that selected record.
or
2) If the user double-clicks in the white area below the displayed records, have the 2nd form open to an empty record so he/she can create a new record.
Can all of this be done?
Here is my code so far. When the user double-clicks anywhere in the list box, the 2nd form opens but displays all the records associated to the key field. Then they have to navigate through the records to edit an existing record or create a new record.
Private Sub List131_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProjectDetail"
stLinkCriteria = "[JobN]=" & Me![List131].Column(1)
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub