<%
If not rs.BOF And not rs.EOF Then '-- shorthand for what you had, this IF statement will execute code if records are found, otherwise it does nothing
with rs
end with
end if
%>
<%
fname = Request.Form("cname")
lname = Request.Form("lname")
mbnumb = Request.Form("mbnumber")
addre = Request.Form("add1")
psword = Request.Form("psw")
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
cn.ConnectionString = "driver={SQL Server};server=PCSERVER;uid=;pwd=;database=iDB"
cn.Open
Set rs = cn.Execute("Select Mnumber from MyMembers where Mnumber='" & mbnumb & "'")
if not rs.BOF and not rs.EOF then '-- record found
Response.Write "this record already exists"
else
with rs
'Continue doing here
end with
end if
%>