G
Guest
I am looking to search for a record (using a combo box as a search field) based on the value of a field in a subform. What I have written results in an error saying that it can't find the field name in the current record. Even though in the code I'm trying to direct the search to the subform, perhaps I'm not doing it right. The subform is called [tblApplicants subform1] and the field in the subform is [Surname] so I thought that I could identify the field as [tblapplicants subform1].surname in the code below
Private Sub Search_AfterUpdate(
If IsNull([Search]) = False The
DoCmd.GoToControl "tblapplicants subform1].surname
DoCmd.FindRecord [Search], A_STAR
DoCmd.GoToControl "Search
End I
Me.Search.SetFocu
End Su
Which it doesn't like, could anyone please advise me on how to get through this one. Much appreciated.
Private Sub Search_AfterUpdate(
If IsNull([Search]) = False The
DoCmd.GoToControl "tblapplicants subform1].surname
DoCmd.FindRecord [Search], A_STAR
DoCmd.GoToControl "Search
End I
Me.Search.SetFocu
End Su
Which it doesn't like, could anyone please advise me on how to get through this one. Much appreciated.