Hi:
This is my first post to this forum! I am a fairly novice user of MS Access. I am creating a trade database for sports cards. I want to be able to have a listbox of past due trades that a user can click on a particular trade and it will open the Trading Partner form (frmTradingPartner with a pkeyEmail) and the related trade in the Transaction Subform (frmTransactionsSubform with a pkeyTradeID). I have search the web and have not been very successful in figuring this problem out. Below id the code that I thought would work the best but it does not seem to find the pkeyEmail. I am sure it is a real simple fix. Thanks again for your assistance!
Private Sub lstIncomingAging_DblClick(Cancel As Integer)
Dim frm As Form, sfrm As Form, Cri As String
DoCmd.OpenForm "frmTradingPartners"
DoEvents
Set frm = Forms!frmTradingPartners
Set sfrm = frm!frmTransactionsSubform.Form
Cri = "[pkeyEmail] = " & Me!pkeyEmail
frm.Recordset.FindFirst Cri
Cri = "pkeyTradeID" = " & Me!pkeyTradeID"
sfrm.Recordset.FindFirst Cri
Set sfrm = Nothing
Set frm = Nothing
End Sub
This is my first post to this forum! I am a fairly novice user of MS Access. I am creating a trade database for sports cards. I want to be able to have a listbox of past due trades that a user can click on a particular trade and it will open the Trading Partner form (frmTradingPartner with a pkeyEmail) and the related trade in the Transaction Subform (frmTransactionsSubform with a pkeyTradeID). I have search the web and have not been very successful in figuring this problem out. Below id the code that I thought would work the best but it does not seem to find the pkeyEmail. I am sure it is a real simple fix. Thanks again for your assistance!
Private Sub lstIncomingAging_DblClick(Cancel As Integer)
Dim frm As Form, sfrm As Form, Cri As String
DoCmd.OpenForm "frmTradingPartners"
DoEvents
Set frm = Forms!frmTradingPartners
Set sfrm = frm!frmTransactionsSubform.Form
Cri = "[pkeyEmail] = " & Me!pkeyEmail
frm.Recordset.FindFirst Cri
Cri = "pkeyTradeID" = " & Me!pkeyTradeID"
sfrm.Recordset.FindFirst Cri
Set sfrm = Nothing
Set frm = Nothing
End Sub