Attendance database

M

mikebach

I want to create a table to store student name, ID#, birthday, and all dates
that the student attended. If the student ID# is the primary key, how do I
do this ?Eventually in a form and a report I'd like to pull up "last date
attended" to see the most recent time the student was in class.
Thank you
 
J

John Spencer

You need at least two tables to do this properly.

Table: Students
StudentID
LastName
FirstName
DOB

Table: Attendance
StudentID
AttendanceDate

I'm guessing you have something more like
Table: IncorrectTable
StudentID
LastName
FirstName
DOB
Attendance

With that structure.
SELECT StudentID, LastName, FirstName, DOB, Max(Attendance) as LastAttended
FROM IncorrectTable
GROUP BY StudentID, LastName, FirstName, DOB

If you are doing this in the query grid.
-- Add all the fields you want to see
-- Select View: Totals from the menu
-- Change "Group By" to "Max" under the field where you record the attended
date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top