Gracias a todos por ayudarme en este caso, ya está solucionado.

con esta función:
<% function Existe (NroRef)
dim sSql
dim RsK
dim Rpta
Rpta=False
set RsK=server.CreateObject("ADODB.RecordSet")
Ssql="select COUNT(*) from inmuebles where ref_inmueble='" & NroRef &"'"
rsK.open Ssql,conn,1,2
if not rsK.EOF then
if not isnull(RsK(0)) then
if cint(RsK(0))>0 then
Rpta=true
end if
end if
end if
Existe = Rpta
end function%>
La cual llame antes de insertar los datos, así:
if not Existe(ref_inmueble) then