First of all do not concatenate values from text boxes directly to SQL statements. This leaves you open to SQL injections and may cause different kinds of problems for the statements. For example consider what happens if the text box contains ' character...
If you're using Ole Db, then use
OleDbParameter[
^]
What comes to the error, full name is an alias you have used for a column. You cannot use an alias in a WHERE clause unless it's inside an inner inline view.
So probably the query should be like
"Select tblvisitors.Resident_ID,tblvisitors.Visitors_First,tblvisitors.Relationship_First,tblvisitors.Visitors_Second,tblvisitors.Relationship_Second,tblvisitors.Lastname,CONCAT(tblvisitors.Lastname,tblresinformation.Firstname) as Fullname from dbladiesdormitory.tblvisitors INNER JOIN dbladiesdormitory.tblresinformation ON (tblvisitors.Resident_ID=tblresinformation.Resident_ID) where CONCAT(tblvisitors.Lastname,tblresinformation.Firstname)='" + textBox14.Text + "'",
But I would guess that even that is not what you're after. The best option probably is that you separate the names from the text box to
firstname
and
lastname
variables and compare those directly to corresponding columns. This way if only last name is given you can easily omit the first name from the condition and so on.