Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross tab for clashing sessions

Status
Not open for further replies.

gazza110

Technical User
Apr 14, 2004
42
GB
Hello

I have designed a database to capture detail of revision session for students. The database can detect if there are clashing sessions and generates a report (query)

I want to create a cross-tab to identify which subjects are clashing with each other however I cannot get the output to create a matrix view with the subjects on the row and the column to indicate where clashes have occurred.

For example:

Surname Forename RegGroup SessionDate SessionStart SessionFinish SessionSubject SessionTitle Status
Surname Forename ABC 02/02/2019 09:00 15:00 Design Technology GCSE DT Intervention Day Invited
Surname Forename ABC 02/02/2019 09:00 15:00 Graphics GCSE Graphics Intervention Day Invited


this is an identified clash, This student has been entered for Design Technology and Graphics at the same time. I want to be able to pivot this to show that there is 1 clash for DT (with Graphics) and 1 clash for Graphics (with DT).

Using a Cross-Tab query I have managed to get query which shows:

SessionDate MaxOfSessionSubject CountOfExamNumber1 Business CNAT Level 2 IT Design Technology Economics English Language GCSE Geography GCSE PE Graphics Physics Science
02-Feb-19 Design Technology 1 1
02-Feb-19 Graphics 1 1


However I want it to show the row heading for Design Technology to have a 1 under the Graphics column and the Graphics Row Heading to have a 1 under the Design Technology column to show where the clashes has occurred between the two subjects.

Any ideas?

Thanks
Gary


File:

 
Please use TGML to format your data displays so we can see what you are asking for without opening attachments. Is your query for only one student or all students? Showing only two records doesn't seem real world where there would be many more.

You can easily post your query SQL view.

What happens if you simply remove the GROUP BY SessionSubject?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top