Hi!
I am using ASP Runner 6.1.
I have a code below (in Add Page Before Record Added) that will check 2 values and display an alert if the 2 conditions are met.
==========================================================================
dim rsExists, rsExists1
set rsExists = dal.Table1.Query("EmailAddress='" & values("EmailAddress") & "'","")
set rsExists1 = dal.Table1.Query("Course='" & values("Course") & "'","")
if not rsExists.eof And not rsExists1.eof then
Flush_output
Response.Write "<script>alert('Our record shows that you have registered to this course already.')</script>"
else
BeforeAdd=true
end if
rsExists.Close : set rsExists = Nothing
rsExists1.Close : set rsExists1 = Nothing
==========================================================================
I did some tests and the result was inconsistent. There were times that the alert pops up even if you register for a different course.
Thanks,
Jay