How to add second criteria to OpenForm function?
Basically, I need help with double click VBA code event in a ListBox.
I two related forms, in the primary form contain a listbox, when user double click on a specific record, the second form will open and should filter record based on 2 criteria (LoanInfoID and RequestDate).
Private Sub RequestList_DblClick(Cancel As Integer)
DoCmd.OpenForm "F_LoanDocuments", , , "LoanInfoID=" & LoanInfoID AND SECOND CRITERIA IN LIST BOX(RequestDate)
DoCmd.GoToRecord , , acNewRec
End Sub
ListBox Row Source:
SELECT T_Request.LoanInfoID, T_Request.RequestDate, T_TransactionType.TransactionType
FROM T_Request INNER JOIN T_TransactionType ON T_Request.TransactionTypeID = T_TransactionType.TransactionTypeID
GROUP BY T_Request.LoanInfoID, T_Request.RequestDate, T_TransactionType.TransactionType
ORDER BY T_Request.RequestDate;
Thank you in advance
Van
Basically, I need help with double click VBA code event in a ListBox.
I two related forms, in the primary form contain a listbox, when user double click on a specific record, the second form will open and should filter record based on 2 criteria (LoanInfoID and RequestDate).
Private Sub RequestList_DblClick(Cancel As Integer)
DoCmd.OpenForm "F_LoanDocuments", , , "LoanInfoID=" & LoanInfoID AND SECOND CRITERIA IN LIST BOX(RequestDate)
DoCmd.GoToRecord , , acNewRec
End Sub
ListBox Row Source:
SELECT T_Request.LoanInfoID, T_Request.RequestDate, T_TransactionType.TransactionType
FROM T_Request INNER JOIN T_TransactionType ON T_Request.TransactionTypeID = T_TransactionType.TransactionTypeID
GROUP BY T_Request.LoanInfoID, T_Request.RequestDate, T_TransactionType.TransactionType
ORDER BY T_Request.RequestDate;
Thank you in advance
Van