I'm trying to create a search box that searches through my subform and displays both records from that subform as well as the related records in my main form.
I can easily create a search box that filters records from my main form however fields which need to be searched in my subform are not in my main form's record source.
To create a search box for my main form, I created a text box and a button. I opened up the macro builder and went to apply filter, and typed this: [RoomName] Like "*" & [Forms]![frmMainRooms]![txtSearch] & "*" as my where condition.
To try to make this work with my subform, i changed it to [forms]![frmMainRooms]![frmSubFacilityMgr]![LastName] Like "*" & [Forms]![frmMainRooms]![txtSearch] & "*"
When I try this, it opens up a blank record. What am I doing wrong?
Also I realize I should be doing this with VBA and not macro builder. I don't understand enough about VBA to get this done.