Keith wrote:
I have a simple form where a user enters their email address, which
then passed them to a 2nd page where the email address entered is
used to filter a recordset.
How can I set up an IF statement so it checkes every record in the
recordset, and if the email address entered does not match any record
redirect to another page?
Don't loop through a recordset to see if a record exists, that's what a
WHERE clause in a sql statement is for. A recordset loop can be thousands of
time slower than a sql statement with a filter.
I'd like to provide a specific example, but I don't know what database you
are using. Please supply the database type and version whenever you ask a
database-related question. It is almost always relevant.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"