One way of dealing with this is to add an OR to the end of your sqlstring
OR PersonIP = '" & Request.ServerVariables("REMOTE_ADDR") & "'"
This will give you a record set with any records that meet either criteria. Loop through the record set and if you find the PersonName, spit out the error. If you find the IP, spit out that error. If the record set has no members, the query didn't find either the IP or the name.
Please note that in the US at least, most people are on dynamic IP's. I may have the IP today, and my neighbor may have it tomorrow. Also, some client-side security software hides parts of the http headers. Norton Internet products hide the http_referrer, and I think - but don't know - that Norton Internet Security also plays with the IP.
Edited by dpyers