PDA

View Full Version : Looping through access datatables and compare values to get conflicting data


12345_abcde
Jul 16, 2013, 05:36 AM
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?

How do I loop through the 2 tables in my access database and search for conflicting data and display the output into a multi line textbox?

Thanks in advance!

Any help is greatly apreciated!