Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Dcount Problem?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tyler Denmead - 19 Apr 2005 20:51 GMT
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.
Marshall Barton - 20 Apr 2005 05:15 GMT
>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))

Signature

Marsh
MVP [MS Access]

Tyler Denmead - 20 Apr 2005 18:16 GMT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.