You are correct, and if I was writing this program from scratch I would do things very differently.

Unfortunately, it is an already existing program that I have been asked to amend and re-writing would take too long.

The reason it is using the KeyPress event is because certain Keys are restricted and they have added the search into the same event.