Perform another search on the database, appending the surname to the intial where clause string used.
e.g. [ Pseudocode fix up for your own needs ]
Dim query as string
if textSurname.text = string.empty then
query = "Select Firstname From Names Where Firstname='" + textFirstname +"'"
else
query = "Select * From Names Where Firstname='" + textFirstname + "' AND Surname='" + textSurname + "'"
end if