The screenshot shows a text box labeld with “Find”. The name of the text box is “txtFind”.
The following subprocedure is assgined to the On Exit event of the text box.
Private Sub txtFind_Exit(Cancel As Integer)
Me.Filter = “[BookTitle] like ‘*” & [txtFind] & “*'”
Me.OrderBy = “BookTitle”
Me.FilterOn = True
End Sub
Yes, after entering, say, “Introduction”, indeed Access succeeds to display only records with “Introduction” in the BookTitle field. Then all the nighmares start to show up. Pressing all other buttons shown in the screenshot has not effect. Especially for the “All” button, it is assigned the following subprocedures:
Private Sub CmdAll_Click()
Me.OrderBy = “BookTitle”
Me.OrderByOn = True
Me.FilterOn = False
End Sub
But why?
In addition, whenever scrolling several pages down and clicking a record, the form always scroll back to the first record. It appear a Requery is executed.
But why?
Please help. Thanks.
Armstrong