Query to show record plus previous three

  • Thread starter Thread starter B. Meincke
  • Start date Start date
B

B. Meincke

I'm sure there is a simple solution to my problem, but it evades me at the
moment.

I need a query that will pull an attendance record for a specific student in
a specific course for a specific week (parameters set by form combo boxes)
that will also display the three attendance records for the same
student/course for the previous three weeks.

Lets say a teacher selected a student named John Smith in Grade 12 Chemistry
for week number 10. The form would display that record from the underlying
attendance table and also the number of hours and any comments recorded for
John Smith in Grade 12 Chemistry for weeks 9, 8, and 7.

I hope this makes sense, and thank you in advance for any help or suggestions.
 
I am assuming the Week is an integer and that the selection process is a form
with text box.
Use this as criteria for Week ---
Between [Forms]![YourForm]![TextBox] - 2 AND [Forms]![YourForm]![TextBox]
 
Back
Top