So I have a form that is ordered by the field Control_Number. I want to put an unbound box (called Search_CN) on the form where I can type in a number and a command button to go straight to the record that matches that number. I have it setup as follows:
Private Sub ClearFilter_Btn_Click()
Me.Filter = ""
Me.FilterOn = False
Me.Requery
End Sub
Private Sub Command52_Click()
Me.Filter = "Control_Number = Me.Search_CN"
Me.FilterOn = True
Me.Search_CN = Null
End Sub
It works great the first time. I can filter and unfilter with any number I like. However, if I enter a different number and click the filter, it still goes to the first number. Seems like there is no way to replace the first filter. What am I missing? Is there a better way to do this? Ultimately I want to be able to "warp" straight to a specific record, go back to all records, and then go to a different specific record. Thanks
Will