if statement producing incorrect result

I am trying to see why this if statement is not producing the correct message. What is supposed to happen, is that if a user selects a row that is not marked in the db as ‘In’ then the first...