Also, you need multiple comparisions. This one line if statement isn't complex enough (it only works if both a first name and last name are set.

Check out my function: private void searchContact(String searchTerm).

The first part of that function is basically what you need to do. Perhaps it would make more sense to make a helper function that this uses and that my function uses.