How to count total Students in database

E

Emine

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?
 
E

Ed Robichaud

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top