Code Query ..URGENT..Simplified..

Results 1 to 2 of 2

Thread: Code Query ..URGENT..Simplified..

  1. #1
    Join Date
    Dec 1969

    Default Code Query ..URGENT..Simplified..

    -- Repost --<BR><BR>Hi,<BR><BR>I have the following code.<BR><BR>== Code ==<BR>Public Function NextModuleAuth(StudentID, ExamModule)<BR> Dim Conn As New ADODB.Connection<BR> Dim RSFind As ADODB.Recordset<BR> Dim TempReturn As String<BR> Conn.Open LocalDSN, LocalUserName, LocalPassword<BR> Set RSFind = Conn.Execute("Select * " _<BR> & "From Results where " _<BR> & "StudentID = &#039;" & StudentID & "&#039; And " _<BR> & "ExamModule = &#039;" & ExamModule & "&#039; And " _<BR> & "Result = ""100"" ")<BR><BR> If RSFind.EOF Then<BR> TempReturn = TempReturn & "test.asp"<BR> End If<BR> <BR> NextModuleAuth = TempReturn<BR>End Function<BR><BR>What I wish to do is that there are 4 modules a person can select to sit for. What I wish to do is that perform a check if the person passed the previous module before attemtping to sit for the current one.<BR><BR>e.g if the person chose module 2 and it should check that he passed module one, if he chose 4, it should check he had passed modules 1,2 and 3.<BR><BR>How do I achieve this?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Youve already posted! give it a chance

    i responded e few minutes ago to your original post, so take a look.<BR><BR>there is something fundamentally wrong with your SELECT statement. you are selecting only one record. if you want to check for previous module&#039;s results then you need to select the records for that StudentID for ALL MODULES.<BR><BR>think aboout it!<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts