Dcount Problem?

  • Thread starter Thread starter Tyler Denmead via AccessMonster.com
  • Start date Start date
T

Tyler Denmead via AccessMonster.com

I would like to total the number of records that meet certain criteria in a
form. The field name is "October". 1,2,3, or 4 can be entered into the
field. The name of the query that is used in the form is "Student
Attendance Query". I would like to total the number of records that have a
"1" in a text box. I cannot figure it out... I'm not an Acess programmer
if you can't tell already.
Thanks.
 
Tyler said:
I would like to total the number of records that meet certain criteria in a
form. The field name is "October". 1,2,3, or 4 can be entered into the
field. The name of the query that is used in the form is "Student
Attendance Query". I would like to total the number of records that have a
"1" in a text box.


If you want to count the number of 1 records in a table, all
you need is
DCount("*", "thetable", "October = 1)


In you want to count the 1 (possibly filtered) records in a
form, then use a text box in the form's header or footer
section. the text box's expression (among others) could be
=Sum(IIf(October = 1, 1, 0))
 
Back
Top