I previously posted here with a problem i had with getting a check on my database variables... Now I am checking two variables... it works with one... what am i doing wrong when i try two ?????
code as follows
<%
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adCmdTable = &H0002
'our variables
Dim strEmail, strName , objRS , objConn
'get the results from the create newsletter form

strEmail = Request.Form("emailadd")
strName = Request.Form("name")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DBQ=" & Server.MapPath("newsletter.mdb")& ";Driver={Microsoft Access Driver (*.mdb)}"
'create recordset object and open it
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open "email" ,objConn,adOpenStatic,adLockOptimistic,adCmdTable
'our bookmark
strBookmark = objRS.Bookmark
'loop through records trying to find our email
While not objRS.EOF
If (objRS("email") = strEmail And objRS("name") = strName ) Then
strBookmark = objRS.Bookmark
Else
strBookmark = ""
End If
objRS.MoveNext

Wend
If strBookmark <> "" then
objRS.Bookmark = strBookmark
'delete entry
objRS.delete
'close recordset and connection
Else
Response.Redirect ("retry.html")
%>
seems that the problem is in the line.....

If (objRS("email") = strEmail And objRS("name") = strName )

when using
If (objRS("email") = strEmail)
it works fine ... but need to check both variables email and name

Please help !!!!
Look forward to your reply... anyone !!