Microsoft Access 2013 Report Grouping levels need to count unique records

I have a report almost complete. I track request from various sources. The database tracks the time spent on each request. dbreqid is the key field and the request has multiple entries for documenting time. When I do a group by requester and count the number of request it counts for each of my time records. One request will have multiple time records. How do I count just the distinct records in the dbreqid field. I have group level for the source but it counts each individual time record not each dbreqid. I tried to group on dbreqid but that doesn't work either. Thanks for the help.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
You'll have to use a subquery, something like this:

    Count(*) As Requests
    (Select Source, Requester, Sum(TimeSpent) As TotalTime From tblTable Group By Source, Requester) As T
Group By

This should give you the clean figures.
In your report, however, you would do the grouping and counting, Thus it should use the subquery above as source.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You may need to break the report into a main report with a subreport.  That will allow you to count records separately for each recordset.
marlind605Author Commented:
I am looking at the two answers. Thanks.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

marlind605Author Commented:
Still not getting this. Tried subreports and different queries. Any other help?
Gustav BrockCIOCommented:
That's hard without knowing what you did try.

marlind605Author Commented:
What I ended up doing was creating two make table queries one to show each request by organization and the other created from the first result to show count by organization and request and then used the added the query to the one I was using for the report. It is not the way I wanted to go but seems to run quick and is accurate. There may be another solution but I couldn't figure it out. Thanks for all the replies.
Gustav BrockCIOCommented:
OK, thanks for the feedback.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.