Prev: importing tables in proper format from word 2007 into access2007
Next: Combo box After Update won't update the recordset/table
From: dolphin on 22 Jan 2010 10:15 I have a list of students that I track for mandatory classes. Conditional formatting is set to show when someone has not completed a course or is overdue on a recertification. It will show red when the class is overdue. I have the toal amount of students totaling up in a sums box. How can I subtract number of those that have not met the requirements?
From: Salad on 22 Jan 2010 11:32
dolphin wrote: > I have a list of students that I track for mandatory classes. > Conditional formatting is set to show when someone has not completed a > course or is overdue on a recertification. It will show red when the > class is overdue. I have the toal amount of students totaling up in a > sums box. How can I subtract number of those that have not met the > requirements? In the textbox to display the difference, you could put something like this in the control source (under Data in the Property sheet) =NZ(Me.SumsBox,0) - NZ(Dcount("StudentID","Students","MissedClass > 0",0) NZ converts a blank Null value to zero. If the form had no records, it can then subtract 0 from 0, not Null from Null that will produce and error. Look in help for Dcount. I used StudentID as your field name, Students as the table name, and MissedClass as the field name on the form). You would need to change those values to the field names you use as well as the table/query name you use. Look in help as well at DSum, Dlookup, DMax, DMin and their examples for clarification in how they are used. |