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 / Queries / May 2005

Tip: Looking for answers? Try searching our database.

Count Queries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karen53 - 15 May 2005 17:47 GMT
Hello,

I have been going around and around with this.  From my query I want to be
able to count the number of items recieved, the number shipped and the number
not shipped.  One field is the item name received, the other a check box
indicating whether it has been shipped.  I have been unable to get it to work
in one query.  So, I tried separating them into their own query.  The trouble
is, I can't combine them for a report. They all work fine individually, but
when I try to combine them into one query it multiplies the values.  If I
link the Item names, it filters to the shipped items only.  I would like to
be able to do it in one query.  Is there a way?  I tried various expressions
but they did not work.  Any suggestions?

Thanks
Karen53 - 15 May 2005 19:53 GMT
I am getting a separate line item for each item depending on the shipped
checkbox being true or false, even though I am linked by item.

> Hello,
>
[quoted text clipped - 10 lines]
>
> Thanks
Dale Fye - 16 May 2005 03:09 GMT
Karen,

Can you give us an example of the field in your table, a couple of records
from that table, and what you would expect the results of the query to
return, given only the rows of data you give us?

Without knowing your table structure, but with your description below, I
would guess the query would look something like:

SELECT ItemReceived,
              SUM(1) as Received,
              SUM(ABS(Shipped)) as Shipped,
              SUM(1-ABS(Shipped)) as NotShipped
From yourTable
GROUP BY ItemReceived

HTH
Dale

> Hello,
>
[quoted text clipped - 16 lines]
>
> 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.