Hi, my VB skills are at beginner level and I need assistance with this code please. It is code for a SEARCH box on my form. This textbox uses a subform to filter based on the user's input.
I have this code below but I am getting Error 424 "object required" - the 6th line of code is highlighted in yellow. I really appreciate any assistance with this.
Private Sub cmdSRCHBOX_Change()
If Len(cmdSRCHBOX.Text & vbNullString) = 0 Then
SearchForm.Form.Filter = vbNullString
SearchForm.Form.FilterOn = False
Else
SearchForm.Form.Filter = "[TripID] Like '*" & cmdSRCHBOX.Text & "*' OR [PatientID] Like '*" & cmdSRCHBOX.Text & "*'"
SearchForm.Form.FilterOn = True
End If
End Sub