Me again. When searching the database, you said that if we leave both fields blank that all of the records in the database would be listed. I don't want this, I want to avoid this. So I want to put in my code, that at least one of the fields on the search form has to have something in it. I have attached what I thought might work but it doesn't, I get an error. I created an if statement and put it directly under my Request lines. What I tried to do is if the Surname field AND the GivenName field are empty, then go back to the search page, else continue on to the WhereStr.
if Surname = "" & "AND" GivenName = "" then response.redirect "search.asp" else WhereStr = "" and so on. Am I approaching this correctly or is there something else I should do. If this is the correct to achieve what I am trying to do, what did I do wrong. Thanks again.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Active Server Pages Forum.