Hello,
I'm a beginner in vba Access. I have a Search Form (frm_Search) with a combo field (cboSponsorName) and button (cmdOpenBySponsor) that I intend to use for opening the MainForm. The MainForm (frm_Project) has a subform (frm_Sponsor), it's a one to many relationship. I would like to open only the main form that is filtered by a subform field (SponsorName). Please help.
Code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Project"
stLinkCriteria = "SponsorName like '%" & Me.cboSponsorName & "%' "
DoCmd.OpenForm stDocName, , , stLinkCriteria
Thanks!