If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Query in a query
I have a query (thanks to this group) which returns the very last date in a sequence. This query works great. I now want to use it in another query where I take the last date in the sequence (the last time a child received a new karate belt) to NOW and count the number of attendances.
I have a table with attendance information: Student Name Month Number of attendances for the month and I have the query which returns the last belt date My question: How would I write a query which shows the attendance of the student since the last belt promotion? Would I add a colum to the original query or create a whole new query? Thank you VERY much for your help. |
#2
|
|||
|
|||
Query in a query
Hi,
Bring the original table and the queries, link then through the StudentID. Click on the summation button, on the toolbar, to get the extra line, total, in the grid. In the grid, drop the field original_table.DateOfAttendance , change the GROUP BY to WHERE, and add the criteria: = queryname.LatestDate. Bring one of the field StudentID, keep the GROUP BY. Bring it again, this time, change the GROUP BY to COUNT. That's all. The COUNT occur within each group, AFTER the WHERE clause has been considered, so, it should do what you search to get. Hoping it may help, Vanderghast, Access MVP "PPerry" wrote in message news I have a query (thanks to this group) which returns the very last date in a sequence. This query works great. I now want to use it in another query where I take the last date in the sequence (the last time a child received a new karate belt) to NOW and count the number of attendances. I have a table with attendance information: Student Name Month Number of attendances for the month and I have the query which returns the last belt date My question: How would I write a query which shows the attendance of the student since the last belt promotion? Would I add a colum to the original query or create a whole new query? Thank you VERY much for your help. |
Thread Tools | |
Display Modes | |
|
|