I think there is a problem with checking past students attendance in this lesson. There will be incorrect information if there are two different classes take place on the same day.
To see if this is the case, do the following:
Make this simple. Modify the tables so that there are only two students: CustomerID 3 and 2. (Fig 1)
Notice that CustomerID 3 was enrolled in ClassID 1 while CustomerID 2 was enrolled in ClassID 4.
Now open ClassF form and change the date under Take/Check Attendance button to 7/4/2022 (Fig 2)
Click the Take/Check attendance button
Notice that there are now two students in the list. This is incorrect. ABS inc wasn't enrolled in ClassID 1. He was enrolled in ClassID 4.
The problem lies on the subform inside AttendanceF. The subform uses AttendanceByDateQ query. (Fig 3)
The AttendanceDateTime field in the query is restricted by [Forms]![AttendanceF]![CurrentDate]. But this is not a good enough restriction since this only restricts the date but not the class. To restrict the class, the ClassID field must be restricted by [Forms]![AttendanceF]![ClassID] (Fig 4)
Hendra GunawanOP
@Reply 4 years ago
Hendra GunawanOP
@Reply 4 years ago
Hendra GunawanOP
@Reply 4 years ago
Hendra GunawanOP
@Reply 4 years ago
Hendra GunawanOP
@Reply 4 years ago
I think there is an easier way to show why this is a problem. You don't need to modify any table. Simply download the database file from Access Expert Level 15 page.
Open ClassF form
Switch to ClassID 2 by using the navigation button at the bottom of the form
Change the Take/Check Attendance Date to 10/4/2013
Click Take/Check Attendance button
You will see the list of students attendance for ClassID 2 even though there are no students enrolled in the class. ClassID 2 is empty.
Hendra GunawanOP
@Reply 4 years ago
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 15.