954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to I create groups and Display them

HEELP!!
I am working on this project and I am trying to create tutor groups and allocate students to it automatically based on the number of students. The max number of students in each group is 20 but can be less than 20.

I have been able to code is VBA to create tutor groups based
how do i convert this to ASP code and is it possible to insert the students into the groups? according to the groups created?


Private Sub Tutor_Group_no_Click()
Dim NoG As Integer, NoS As Integer

Dim rstut As New ADODB.Recordset
rstut.Open ("select * from tblTutor_Group"), CurrentProject.Connection, adOpenKeyset, adLockOptimistic

NoS = DCount("Student_Id", "Query_Computing_and_Information_Systems")

Do Until NoS < 0

rstut.AddNew
rstut("Course_Id") = 1
rstut.Update
NoS = NoS - 20

Loop

MsgBox "Done"

End Sub

niran
Newbie Poster
1 post since Feb 2006
Reputation Points: 10
Solved Threads: 0
 

The first step is to find a group that has less than 20 students.. write a query that does a count of students per group, and put the criteria as "less than 20". grab the top 1 of that result.

Then, run some code to do a simple insert of that student's into that particular tutor group.

HEELP!! I am working on this project and I am trying to create tutor groups and allocate students to it automatically based on the number of students. The max number of students in each group is 20 but can be less than 20.

I have been able to code is VBA to create tutor groups based how do i convert this to ASP code and is it possible to insert the students into the groups? according to the groups created?

Private Sub Tutor_Group_no_Click() Dim NoG As Integer, NoS As Integer

Dim rstut As New ADODB.Recordset rstut.Open ("select * from tblTutor_Group"), CurrentProject.Connection, adOpenKeyset, adLockOptimistic

NoS = DCount("Student_Id", "Query_Computing_and_Information_Systems") Do Until NoS < 0

rstut.AddNew rstut("Course_Id") = 1 rstut.Update NoS = NoS - 20

Loop

MsgBox "Done"

End Sub

Twiggie
Newbie Poster
1 post since Feb 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You