Looping through access datatables and compare values to get conflicting data

Fangling Liew

Honorable
Jul 16, 2013
1
0
10,510
i have a table in access containing data like:

PaperID--School--PaperID---PaperTitle--Noofstudents---Duration---ListofModules
paper 1---SEG----EG1832---Mechanics---- 286----1.5(hrs)---EG1832
paper 2---SEG----EG1833---ElectricalPrinc--375--1.5 -------EG1833 EG1952 EG1903
another table with:

module students
EG1832 ----- 111411H
-blank ----- 111380Y
-blank ---- 151621H
EG1952 ----- 198653H
-blank ----- 545411Q
- blank ---- 111411H
if let say student;111411h is taking EG1832 and EG1952, then output:

Conflict modules No.ofstudents student(adminNo)
paper1 : paper2 1 111411H
anyone tell me how to go about doing this?

thanks in advance!
 

Shabra

Honorable
Dec 13, 2013
5
0
10,510
The tables seem incomplete. How do you know that EG1832 and EG1952 conflict? Are there dates for the papers somewhere?
Once you had a pair of conflicting modules, you'd need to create two temporary tables of students taking each of the two modules, then select students that appear in both tables.