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
|
|||
|
|||
How to count total Students in database
Happy Holidays Everyone! I know this is written somewhere and I've several
inquiries that were answered, but not sure which answer to select for my problem. I have a Student Database. I created a form using a query from the Student Table. I created fields within my form that say "Total Requests", "Pending Requests", and "Completed Requests". How do I write code, or do I even write a code so that these fields automatically calculate when the form opens? If I do need to write a code, which Even Procedure do I use? I have created a QC Status Form based on a query from the Student ID table. I have a field called "Requested Completed" In the criteria I wrote "no" meaning it shows all records until the dropdown from the Table is changed to yes, then it does not show that record. However, when the QC person is updated the record and changes the status from no to yes, how can I create a fresh button on the QC form each time a record is updated so it shows only records that were changed from no to yes. Right the QC form freshes each time open "on load", but can I put a fresh command button on the form? And how do I do this? |
#2
|
|||
|
|||
How to count total Students in database
Lots of questions in there! If I understand you correctly, you have just
one table. A better structure would be to have a table for Student Info (name, ID, etc.) and another for Requests (dateRequested, studentID, dateCompleted, etc.). You can then see the total requests per student, total completed (based on [dateCompleted] not null, and calculate the number pending (total requests - #completed). You can create a command button for you form and set its OnClick event to run "DoCmd.Requery" to update all calculated controls with changed data. This is normally done "automatically" by using the AfterUpdate event of all data entry controls that effect your calculations. "Emine" wrote in message ... Happy Holidays Everyone! I know this is written somewhere and I've several inquiries that were answered, but not sure which answer to select for my problem. I have a Student Database. I created a form using a query from the Student Table. I created fields within my form that say "Total Requests", "Pending Requests", and "Completed Requests". How do I write code, or do I even write a code so that these fields automatically calculate when the form opens? If I do need to write a code, which Even Procedure do I use? I have created a QC Status Form based on a query from the Student ID table. I have a field called "Requested Completed" In the criteria I wrote "no" meaning it shows all records until the dropdown from the Table is changed to yes, then it does not show that record. However, when the QC person is updated the record and changes the status from no to yes, how can I create a fresh button on the QC form each time a record is updated so it shows only records that were changed from no to yes. Right the QC form freshes each time open "on load", but can I put a fresh command button on the form? And how do I do this? |
Thread Tools | |
Display Modes | |
|
|