Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find absents then print?

Status
Not open for further replies.

chiuchimuN

Programmer
Apr 24, 2002
29
US
I have a database with student id and day they are schedualed to attend:

ID day
101 Wed
002 Fri
203 Mon
etc...

Another table that contains their actual attendance:

ID Att
340 5/10/02
096 5/10/02
112 5/03/02
023 5/03/02
etc...

How can I find out who was absent in the last 2 weeks?



 
Hi, Kurage,

Short of writing a program for you (you are a programmer), here's the design overview...

1. Sort the Schedule by ID
2. Sort the Attendance by ID
2a. Filter Attendance for the weeks desired.
3. Loop reading the Schedule for ID into an Array
4. Find the first row for that ID in Attendance visible cells.
5. If found, then loop thru the array to match the Day of Week with the Date day of week.
6. If not found then write the ID and Date to the Report
7. Loop to 3

Hope this helps :) Skip,
metzgsk@voughtaircraft.com
 
Run a simple query.

Select Name from Student Where StudentID Not In (Select StudentID from Attendance Where DateDiff(&quot;d&quot;,[Attendance].[Attend],Now())<14)

What kind of project is this your working on? It sounds similar to a homework assignment I had when I took an Access class a while back. Jon Hawkins
 
Its for work. I think i'll keep two tables;Attendance and Absents.

1. Sort the Schedule by ID
2. Sort the Attendance by ID
2a. Filter Attendance for the weeks desired.
3. Loop reading the Schedule for ID into an Array
4. Find the first row for that ID in Attendance visible cells.
5. If found, then loop thru the array to match the Day of Week with the Date day of week.
6. If not found then write the ID and Date to the Report
7. Loop to 3
This is something like what I planned. I was really looking for a better way that someone may have already done this type of programming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top