K
ken
Here is my code.
The end of the code is where I need help. My goal is to
keep people from signing up for the same
class twice. However, I don't want to stop them from
taking the class again if they need extra help.
Currently the code prevents anyone from sigining up twice
even if the days are different.
How do I change the code so that it prevents them from
signing up twice on the same day...but not different days.
I want ot add a dateclass = something or use the ID as the
field since Class ID's are unique but I don't know how to
write that one. Any help would be appreciated.
I put the code...yes I got help from others at work. I am
no expert.....any suggestions are appreciated Thanks in
advance!
Dim fname
Dim lname
Dim classenroll
Dim dateclass
Dim dept
Dim phone
Dim time
Dim eventID
Dim email
Dim R
Set R = Server.CreateObject("ADODB.RecordSet")
fname = Request.Form("fname")
lname = Request.Form("lname")
classenroll = Request.Form("classenroll")
dateclass = Request.Form("dateclass")
dept = Request.Form("dept")
phone = Request.Form("phone")
email = Request.Form("email")
time = Request.Form("time")
eventID = Request.Form("eventID")
If len(phone) > 0 AND len(email) > 0 Then
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Mode = adModeReadWrite
conn.ConnectionString = "DSN=Training"
conn.Open
Dim alreadyInClass
SQL = "Select * " _
& "From Enrolled " _
& "Where ClassName = '" & classenroll & "' " _
& "And Fname = '" & Fname & "' " _
& "And Lname = '" & Lname & "' " _
& "And Attended = 0"
The end of the code is where I need help. My goal is to
keep people from signing up for the same
class twice. However, I don't want to stop them from
taking the class again if they need extra help.
Currently the code prevents anyone from sigining up twice
even if the days are different.
How do I change the code so that it prevents them from
signing up twice on the same day...but not different days.
I want ot add a dateclass = something or use the ID as the
field since Class ID's are unique but I don't know how to
write that one. Any help would be appreciated.
I put the code...yes I got help from others at work. I am
no expert.....any suggestions are appreciated Thanks in
advance!
Dim fname
Dim lname
Dim classenroll
Dim dateclass
Dim dept
Dim phone
Dim time
Dim eventID
Dim email
Dim R
Set R = Server.CreateObject("ADODB.RecordSet")
fname = Request.Form("fname")
lname = Request.Form("lname")
classenroll = Request.Form("classenroll")
dateclass = Request.Form("dateclass")
dept = Request.Form("dept")
phone = Request.Form("phone")
email = Request.Form("email")
time = Request.Form("time")
eventID = Request.Form("eventID")
If len(phone) > 0 AND len(email) > 0 Then
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Mode = adModeReadWrite
conn.ConnectionString = "DSN=Training"
conn.Open
Dim alreadyInClass
SQL = "Select * " _
& "From Enrolled " _
& "Where ClassName = '" & classenroll & "' " _
& "And Fname = '" & Fname & "' " _
& "And Lname = '" & Lname & "' " _
& "And Attended = 0"