Hi
I have a page the uses a form the another page calls fields from that form. This is to allow the user to search for a particular record.
Want to redirect user to another page if field doesn't match with access db field
'LastName field from other page
searchTerm=Request.Form("LastName"
'Thought this might work but doesn't
If searchTerm <> RS("LastName"
Then
Response.Redirect("admin.asp"
End If
If LastName field on form is left empty then user is redirected.
If user types in a name that exists in acces db then user is still redirected !!
If user types in name that doesn't exist in access db then "Error '80020009'Exception Occurred" appears on page.
If the IF Then statement is taken out of page the page works fine but doesn't allow for error by user.
Has anyone any ideas. Your help would be greatly appreciated. Cheers
I have a page the uses a form the another page calls fields from that form. This is to allow the user to search for a particular record.
Want to redirect user to another page if field doesn't match with access db field
'LastName field from other page
searchTerm=Request.Form("LastName"
'Thought this might work but doesn't
If searchTerm <> RS("LastName"
Response.Redirect("admin.asp"
End If
If LastName field on form is left empty then user is redirected.
If user types in a name that exists in acces db then user is still redirected !!
If user types in name that doesn't exist in access db then "Error '80020009'Exception Occurred" appears on page.
If the IF Then statement is taken out of page the page works fine but doesn't allow for error by user.
Has anyone any ideas. Your help would be greatly appreciated. Cheers