Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

query count problem

Posted on 2013-01-16
3
Medium Priority
?
327 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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