Solved

query count problem

Posted on 2013-01-16
3
321 Views
Last Modified: 2013-01-17
hey guys,

i've got a weird problem with a totals count query.

below is my QBE design view
picand here's the data table i get from this query
Count-Problem.xlsx

question: how come my count for Team Member W is sometimes 2 or 1 but the rest is all 1? account # is only in tblDataStorage and the primary key is the ID field. even after including the ID field in the query as a group by field, i can still get 1 row of ID but count of 2 for account number. if the count is really 2 for account number, then i should have 2 ID fields right? and 1 record can only have 1 account # (i've also taken the extra measure to verify this. so how come i'm still getting a count of 2? this is most perplexing!!! (i thought i was trained up well enough by EE already but seems like i'm still not good enough to solve this ha = (   )
0
Comment
Question by:developingprogrammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 38786104
remove the group by (and count) function, to run the query to show the plain data.
you will see that you will have several rows for the same "group" of data, considering all fields that you are grouping by.

usually, with joining multiple tables, this is because one or more of the linked tables has indeed several records for the grouped ID ...
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38786106
though this article is not about ms access in particular, it may help understanding the issue:
http://www.experts-exchange.com/Database/Miscellaneous/A_3203-DISTINCT-vs-GROUP-BY-and-why-does-it-not-work-for-my-query.html
0
 

Author Comment

by:developingprogrammer
ID: 38786133
thanks angelIII

yup i did more testing and turned off the Totals and realised that the staff was entering the codes wrongly thats why for 1 ID field there were 2 codes e.g. LVA / PA so there were 2 ID rows with the same ID.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question