I have a form (a receipt) that has a subform. The form is a 1 relationsip with the subfom being a many relationship. I want to search with an user input text box called SearchCaseNumberText. I want it to search all receipts and return the form and subform to the proper receipt. The following code only searches the current subform, not all receipts. How can I get it to search all?
Function SearchCaseNumber()
On Error GoTo SearchCaseNumber_Err
With CodeContextObject
DoCmd.GoToControl "CRNumber"
DoCmd.FindRecord .SearchCaseNumbertext, acEntire, False, , False, acCurrent, True
End With
SearchCaseNumber_Exit:
Exit Function
SearchCaseNumber_Err:
MsgBox Error$
Resume SearchCaseNumber_Exit
End Function
Thanks
Wayne