Hello experts, I have a qry that needs to open based on a where condtion. The qry is opening on a double click of a cell and based on LCID but this double click event is on two different forms. So, based on what form I am on, I need the double click event to recognize this.
here is the double click event on my two diff forms:
Private Sub Amount_DblClick(Cancel As Integer)
The qryLCAmountHistory SQL is like this: (take note of the OR condition at end)
I need the qry to ignore one of the two based on which form is open.
Hope this makes sense....thank you
SELECT tblCompany.CoName, tblCompany.coid, tblLCAmountHistory.*
FROM tblCompany INNER JOIN tblLCAmountHistory ON tblCompany.CoID = tblLCAmountHistory.COID
WHERE (((tblLCAmountHistory.letterofcreditID)=[forms]![frmLCPerFacility]![frmLetterOfCreditSubform]![LCID])) OR (((tblLCAmountHistory.letterofcreditID)=[forms]![frmLCPerFacility]![frmLetterOfCreditDetail]![LCID]));
the two forms names are: 1) frmLetterOfCreditSubform 2) frmLetterOfCreditDetail