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