473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DCount groups in a report

2
Hiya,

Fairly new to Access and was wondering what the best way to perform Dcounts on groups in an Access report.

For example, I have 10 employees and the different instances of jobs they can perform are either Clean, Shampoo or Vacuum. I have a query called Details that shows a history of all the jobs they have performed. On my report I want a total for each employee of how many of each job they have performed.

This is what I know of the Dcount function but the result I get (obviously) is the TOTAL number of the jobs at the end of each group.

These are the text boxes I place in the employee footer:
=Dcount("[ServiceID]","Details","[Service ID] = "Clean")
=Dcount("[ServiceID]","Details","[Service ID] = "Shampoo")
=Dcount("[ServiceID]","Details","[Service ID] = "Vacuum")

Can anyone please help me with the syntax to Dcount the values for each individual employee and not the entire total? I know that the reason the total value is being returned is because I am Dcount'ing the entire Details query. How am i able to Dcount each instance of the employee?

Thanks in advance
Nov 17 '06 #1
2 7906
NeoPa
32,556 Expert Mod 16PB
To be most helpful we need the fieldnames used in the report as well as the SQL of the record source.
I suspect there's a better, more natural, way, but until more info is available...
Try :
Expand|Select|Wrap|Line Numbers
  1. =Dcount("[ServiceID]","Details","(([EmpName]='" & [txtEmpName] & "') AND ([ServiceID]='Clean'))")
or something similar that matches the field names you have.
Nov 17 '06 #2
Wingz
2
To be most helpful we need the fieldnames used in the report as well as the SQL of the record source.
I suspect there's a better, more natural, way, but until more info is available...
Try :
Expand|Select|Wrap|Line Numbers
  1. =Dcount("[ServiceID]","Details","(([EmpName]='" & [txtEmpName] & "') AND ([ServiceID]='Clean'))")
or something similar that matches the field names you have.

That did the trick!! Thanks Neo!
Nov 17 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Simon Matthews | last post by:
Hope someone can help an Access beginner! I've just started keeping my surgical logbook on access and it's a simple flat-file affair. I have created several queries that will list cases...
1
by: Megan | last post by:
Hi Everybody- I've been reading some of the posts about DCOUNT, and I haven't yet found an answer; so, I'm posting this question. I have a report that I'm trying to use DCOUNT on to compute...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
7
by: kaosyeti | last post by:
hey.. i have a control in a report that needs to count the records from a table that match the parameters that the user selects when creating the report. the report is created with...
2
by: Kaspa | last post by:
Hello I am trying to create dcount field but is not working I have tried every way possible and I can't get it to work. here is my code: =Dcount("","qryTotalscratched"," in (6,7,8,9) and ...
3
by: Rebekkah | last post by:
I did a search but couldn't find a question similar to mine. I need to count the values in a textbox on a report and have the count subtotal in a group footer. But I need three different counts on...
5
by: den4673 | last post by:
Hello, I am hoping someone can help me and tell me how to correct my problem. My report is based on an Invoice query, where each invoice has a date, amount and corresponding week number. In the...
36
by: bmyers | last post by:
Good afternoon, I am attempting to count only those records within a report, which is based on a query, where Status is equal to Closed. I have tried multiple variations of DCOUNT but am...
3
by: trafford | last post by:
I want to use Dcount to return a value that I can post back into a report. This must be straightforward but I can't get it to work! The text below is in the report open event. Text44 is an unbound...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.