<%@ LANGUAGE="VBSCRIPT" %> <% option explicit %> <% Dim objConn Dim objRcdSet Dim strSQL Dim TeamCount Dim ParticipantCount Dim TeamMemberCount Dim Remainder Dim MemberNumber Dim TeamNumber Dim x ' Get the participant count strSQL="SELECT Year([EventStartDate]) AS [Year], Count(Participants.PLastName) AS CountOfPLastName" strSQL=strSQL&" FROM Participants INNER JOIN EventDirectors ON Participants.EventID = EventDirectors.EventID" strSQL=strSQL&" GROUP BY Year([EventStartDate])" strSQL=strSQL&" HAVING (((Year([EventStartDate]))=Year(Now())) AND ((Count(Participants.PLastName)) Is Not Null));" Set objRcdSet = Server.CreateObject("ADODB.Recordset") objRcdSet.Open strSQL, objConn, adOpenKeyset, adLockReadOnly, adCmdText ParticipantCount=objRcdSet("CountOfPLastName") objRcdSet.Close objConn.Close Set objConn = Nothing %>
") %>
There are currently <% =FormatNumber(ParticipantCount,0) %> participants registered.

This option will renumber
the teams!!!

Instructions: To update the team numbers:
  • Type the number of teams and click "SUBMIT"
  • To set the team number to zero type 0 (zero)
    in the TEAM NUMBER field and click "SUBMIT"
Optimal Team Sizes <% ' Calculate optimal number of teams TeamCount=1 remainder=-1 TeamMemberCount=ParticipantCount For x=1 TO 10 remainder=ParticipantCount mod x IF remainder=0 and ParticipantCount/x<=10 THEN Response.Write ("
Teams="&x&" Members="&ParticipantCount/x) Else Response.Write ("
Teams="&x&" Members="&ParticipantCount/x) END IF NEXT Response.Write ("
Team Count: