Hi, I have a subform (Child?) on a form that shows filtered data. I want an additional button that will search the filtered data (data is sorted alphabetically) for the first occurrence of the item chosen in a particular column. The code I've tried is below (its some Filter code I got online but doesn't really work all the time). So I want to click my control button for the letter "Z" and it will search the third column fro the first item that begins with "Z". It sometimes works but not as I want it to. Then when I click, say, the letter "C", the filter maintains the "Z" search feature and doesn't clear. I'm hoping you can help me fix my code or give me a diff suggestion. Thnx!
I'm not a programmer but can work with code. Using Access 97.
I'm not a programmer but can work with code. Using Access 97.
Code:
Private Sub SearchZ_Click()
Screen.PreviousControl.SetFocus
SendKeys "%eZ%hs%e", False
DoCmd.RunCommand acCmdFind
End Sub