Something like this?
dim prevFilter as string=Me.StaffBindingSource.Filter
Me.StaffBindingSource.Filter = "NAME = '" & Me.txtsearch.Text & "'"
if Me.StaffBindingSource.count = 0 then
msgbox ("Name is not found")
Me.StaffBindingSource.Filter= prevFilter
end if