Use DLookup before you run your query. Something like this:
If Not IsNull(DLookup("[LastName]", "YourQueryName", "[LastName] = '" & Me.[LastName] & "'")) Then
Run query
Else
Msgbox "That name does not exist."
End if
Change the names in the code to those that you are actually using and put this code in place of the code you have now.
[This message has been edited by Jack Cowley (edited 11-05-2001).]