Experts, I have a listview full of pricing for the user. To make it easy to find items I have a textbox for them to enter a string to search for. I have a "Search" button that will use the users search string as criteria for a query. Then I repopulate the listview with the results. everything is working just fine. My problem is that I put some code in the textbox keypress event so the user can just press enter rather than clicking the "Search" button. I check the key that was pressed for chr(13) and it is a match then i call the "Search" button (btnSearch) click event. What is happening is that when you press the "Enter" key it does what it should, but I get a loud BEEP. I cannot figure how to prevent this.
Please tell me how to correct this or is there a better approach.
Private Sub txtSearch_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtSearch.KeyPress
If e.KeyChar = Chr(13) Then btnSearch.PerformClick()