por lo regular, esta viene siendo la formula
Código ASP:
Ver originalset oCxn=server.CreateObject("ADODB.Connection")
oCxn.open StrCxn
sSQL="SELECT * FROM TABLA WHERE campo1='"&criterio&"';"
set RS=oCxn.execute(sSQL)
if Err=0 then
if rs.EOF=false then
formulario5
else
response.Write "no se encuentra en la base</h3>"
end if
else
response.Write "Llamar al Aministrador"
end if
RS.close
oCxn.close
set oCxn=nothing
strcxn, viene siendo la conexion a tu base de datos
seria mas o menos como realizarlo