I'm trying to create a system to track attendance and I keep running in circles trying to figure out how to design it properly. Basically, what I'm wanting is a form with a textbox on top (txtAttendanceD ate, will explain later) with a complete listing of families in my database (in tblFamily) with a checkbox next to it in datasheet view. So far I'm fine. Next, I want to be able to select the date of the event for which I'm tracking attendance in txtAttendanceDa te and then select the families which attended by clicking on the checkbox. I will then want to pull a report that lists the families that have not attended an event in the past six weeks
My problem is getting all of this information into the attendance table. My original thought was to use an append query that would select all of the families whose checkbox was true and place the family ID into the attendance table and then use value in the txtAttendanceDa te to populate the AttendanceDate field in the attendance table, but the date didn't go over.
Another problem with this design is that I will have a whole bunch of records in the attendance table for some families, each with a different date. How would I query for each family and only pull those that don't have a newer date? For example, if I have two records for one family one dated 1/1/10 and one dated 10/11/12, a query with a criteria of <8/30/12 would list the family because they have a record dated 1/1/10. So I'm trying to come up with a design that will solve both the entry problem and the report problem.
Here is my current design:
My problem is getting all of this information into the attendance table. My original thought was to use an append query that would select all of the families whose checkbox was true and place the family ID into the attendance table and then use value in the txtAttendanceDa te to populate the AttendanceDate field in the attendance table, but the date didn't go over.
Another problem with this design is that I will have a whole bunch of records in the attendance table for some families, each with a different date. How would I query for each family and only pull those that don't have a newer date? For example, if I have two records for one family one dated 1/1/10 and one dated 10/11/12, a query with a criteria of <8/30/12 would list the family because they have a record dated 1/1/10. So I'm trying to come up with a design that will solve both the entry problem and the report problem.
Here is my current design:
Code:
tblFamily FamilyID, PK, AutoNumber Family info... Attended, Yes/No
Code:
tblAttendance AttendanceID, PK, AutoNumber FamilyID, Number, foreign key relationship DateAttended, Date
Comment