473,327 Members | 1,976 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,327 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 7909
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.