Results 1 to 4 of 4
  1. #1
    jmwings is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2021
    Posts
    1

    duplicates by date

    I have an Access database of student class absences.
    I need to find students who were absent for more than 4 classes a day.


    I'm struggling to find a way to get duplicates of students > 4 broken down by day. When I do a query > 4 on Student ID, this returns duplicates of my students over all of the days. I need to group by date first, and then find students > 4 for that day.
    Table columns are StudentID, StudentName, and Date.
    Can anyone help?

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,567
    Hi

    We would need more than the information you have given.

    How are you recording the Classes for each Student?

    Best to upload a zipped copy of the database.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,811
    Agreed. Not clear if Date is null if they attended and not null if they were absent, or what. Also, Date is a reserved word and should not be used for any object. In fact, IMO of all the reserved words it's about the worst one you can use yet it's so often done.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,443
    your table does not make sense - you have a StudentID and a StudentName. I would expect to only see StudentID (as a foreign key) and the name in a separate table of students with StudentID as a primary key. And as Mike says - would also expect to see a classID in the table.

    Suggest provide some example data and the expected outcome from that data.

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

Similar Threads

  1. Delete duplicates from sql query based on import date
    By damngroundhog in forum Queries
    Replies: 1
    Last Post: 09-23-2019, 02:54 PM
  2. Duplicates in Max Date?
    By mrmims in forum Queries
    Replies: 1
    Last Post: 08-06-2015, 09:47 PM
  3. MAX Date Records, But No Duplicates
    By Only4Access in forum Queries
    Replies: 2
    Last Post: 04-07-2015, 06:46 PM
  4. Replies: 4
    Last Post: 07-15-2013, 12:30 PM
  5. Remove duplicates based on date in another column
    By mlhend2002 in forum Programming
    Replies: 5
    Last Post: 12-26-2011, 01:47 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