Question : Grouping Question

From a related EE question (see the link), I obtained a function that works with a query to populate group of students. What I will like to do is to further break the "grouping" of students down such that the query will display number of students taken Math that are "OnCampue", "OffCampus" and "Online".

I will appreciate an amendment to my current Function (Module1) and QrySample in order to get the Expected Result"

Here is tblSType
STypeID              STYpe
   CM                   OnCampus
   SA                    OffCampus
   ST                    Online

I have attached a sample db containing tblSType.

TESTING:
Doubleclick on QrySample and type in 07/01/09 (BeginDate) and 07/31/09 (EndDate)

Below is the result of the "QrySample" and the result of what I am expecting to achieve  at "Expected Result".

Current Result with QrySample:                                                                              
GroupID          CourseGroup                CountOfRID                                
ASL, STU             Math                               26
CFT                     Eat                                  1
LT, STU               GYM                                12
STU                     Physics, Chemitry           22
***************

Expected Result:
GroupID              CouseGroup               SType              CountOFRID
ASL, STU                Math                        OnLine                    6
STU                        Math                        OffCampus              2
STU                        Math                        OnCampus             18
STU                      Physics, Chemistry     OnCampus            19
STU                      Physics,Chemistry      OffCampus             3
LT, STU                    Gym                       OnCampus             12
CFT                          Eat                         Online                     1
*********

 




I have tried it on my own but got several erros.

Answer : Grouping Question

Sorry, it was K6 shows both groups but all the details for Maths and OffCampus only belong to group STU... But your explanation above clarifies the relationship.

Two new queries (mainly naming conventions)

Q1) QueryBy_CourseGroup_and_Type  combines Physics and Chemistry
Q2) QueryBy_Course_and_Type   separately Physics and Chemistry

Two new functions (mainly naming conventions)

F1) GetGroupIDNameCourseGroupType for use in Q1 above
F2) GetGroupIDNameCourseType for use in Q2 above

Random Solutions  
 
programming4us programming4us