You cannot alter the output of the query in this way.
You need to run the query from a button on a form that has a textbox into which the user enters the ssn.
When the button is clicked, you can then run some code to count the records (using Dcount()). If there are none, you can display a messagebox otherwise you can run the query (which would use the texbox on the form for its ssn value)>