Results 1 to 3 of 3
  1. #1
    balajigade is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Posts
    30

    Null values in Report


    I am working on a database of students' marks with fields like 'id', 'subject','marks', 'credits' etc. by copying the results published in excel format to the access 'results' table and generate various reports like aggregates, total credits etc. If the student is absent for a subject, the published results do not show any record against this id for the particular subject. In that case when others have, say, 10 subjects, he will have only 9 subjects in my report.Instead, I would like to show null or zero value against the particular subject of the student in the report. Someone suggested me to use the IN("") function in the query for each subject name, but in such case I will have to deal with hundreds of subjects !! How do I address this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Need a dataset that pairs each student with every possible subject. This can be generated with a query that includes Students table and Subjects table. There will not be a JOIN clause in the query and this will result in a Cartesian relationship - every record of each table will associate with every record of other table.

    Then join that query to the Results table with a join type of "Include all records from the {Cartesian query name} and only those records from Results that match". The join will be a compound link on student ID and subject ID.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    balajigade is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2014
    Posts
    30
    Thanks. Problem solved

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Excluding null values from a totals in a report
    By Andreshan in forum Reports
    Replies: 4
    Last Post: 02-25-2014, 12:52 PM
  2. Replies: 7
    Last Post: 12-04-2013, 01:55 PM
  3. Hide Null Values in Report
    By rdr910 in forum Reports
    Replies: 10
    Last Post: 03-15-2012, 03:09 PM
  4. Finding the Max Date and Null Values if Null
    By SpdRacerX in forum Queries
    Replies: 1
    Last Post: 02-03-2012, 06:29 AM
  5. Replies: 5
    Last Post: 08-24-2010, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums