I am using MS Access 2010 and trying to re-create the function of the search function on the navigation bar using a text field on the form as I will be removing the bar as part of the design. I have created the unbound search field and have it working fine with the following code.
Private Sub SearchBox_AfterUpdate()
Dim SearchCriteria As String
SearchCriteria = Me.SearchBox
Me.SearchBox = Null
DoCmd.FindRecord SearchCriteria, acAnywhere, False, acSearchAll, True, acAll
This works exactly as the search on the bar, other than the FindNext where each time you press enter, the search bar finds the next match. I am struggling as to how to implement the find next with my unbound search field.
Would be grateful for any help?