mwork
05-13-2007, 05:20 PM
Hey All,
I am trying to make a button in the main form that will search the subform. Here is what I have:
Private Sub Find_Click()
Dim strFindRecord As String
strFindRecord = InputBox("Enter a name to find", "Enter Name")
DoCmd.GoToControl ("ctlPart_Number")
DoCmd.FindRecord strFindRecord
End Sub
It works if ctlPart_Number is in the main form, but not if it is in the subform. How do I get it to work?
I am trying to make a button in the main form that will search the subform. Here is what I have:
Private Sub Find_Click()
Dim strFindRecord As String
strFindRecord = InputBox("Enter a name to find", "Enter Name")
DoCmd.GoToControl ("ctlPart_Number")
DoCmd.FindRecord strFindRecord
End Sub
It works if ctlPart_Number is in the main form, but not if it is in the subform. How do I get it to work?