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 / New Users / November 2006

Tip: Looking for answers? Try searching our database.

count only if criteria in another field is met

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Camilady - 01 Nov 2006 20:33 GMT
Can I Count (the report footer) based on criteria in other fields,
sort of : count if [Team] =  Trim and [Status ]= red
I have tried many different combinations to get this to work or do I need to
create queries for this .  I have 15 different teams which could have one of
four different  Status's
total neophyte would be grateful for suggestions
thanks
KARL DEWEY - 01 Nov 2006 20:48 GMT
Try this --
  Sum(IIF([Team] = "Trim" And [Status] = "red", 1, 0)

Trim and  red need to be in quotes as they are text.   This evaluates team
and status and gives a value of 1 (one) if true and then sums the results.

> Can I Count (the report footer) based on criteria in other fields,
> sort of : count if [Team] =  Trim and [Status ]= red
[quoted text clipped - 3 lines]
> total neophyte would be grateful for suggestions
> thanks
Camilady - 02 Nov 2006 16:25 GMT
thanks for the quick answer  - I did try this in the report footer, however
when I went to print preview I got an error message'Syntax error in query
expression'.  I double checked the way I entered the formula and added an =
to the beginning and still got an error

> Can I Count (the report footer) based on criteria in other fields,
> sort of : count if [Team] =  Trim and [Status ]= red
[quoted text clipped - 3 lines]
> total neophyte would be grateful for suggestions
> thanks
KARL DEWEY - 02 Nov 2006 19:49 GMT
Post the SQL of the query for your report.

> thanks for the quick answer  - I did try this in the report footer, however
> when I went to print preview I got an error message'Syntax error in query
[quoted text clipped - 8 lines]
> > total neophyte would be grateful for suggestions
> > thanks
Camilady - 03 Nov 2006 13:25 GMT
Huh? , where would I find that?

> Post the SQL of the query for your report.
>
[quoted text clipped - 10 lines]
> > > total neophyte would be grateful for suggestions
> > > thanks
KARL DEWEY - 03 Nov 2006 16:10 GMT
I am assuming that your report is based on a query.
Open the query in design view, click on menu VIEW - SQL View.  This opens
another window.  Highlight, copy, and paste in a post.

> Huh? , where would I find that?
>
[quoted text clipped - 12 lines]
> > > > total neophyte would be grateful for suggestions
> > > > thanks
 
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.