Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count the distinct number of employeeid

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Joined
Jul 20, 2004
Messages
337
Location
US
What syntax do I use to count the distinct number of employees. I created a report and the report my have many employee id records. I am trying to count how many employees worked that week. I tried =count([employeeid]) in the control source of the text box, but that counts up all the records not how many employee id's exist.
 
Is the report grouped by employeeID? If not, you can create a query with your unique count and join the query to your report's record source.

Duane
Hook'D on Access
MS Access MVP
 
in the query SELECT DISTINCT

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work
 
it is grouped by employee, however the information is from a query that has multiple records of the employee. If I could count just on the groupings that would be great.
 
Since it is grouped by employee, you can add a group header for employee and add this text box in the header:
[blue][tt]
Name: txtCountEmployee
Control Source: =1
Running Sum: Over All
Visible: No
[/tt][/blue]
Then, add a text box in the Report Footer section:
[blue][tt]
Name: txtTotalCountEmployee
Control Source: =txtCountEmployee
Running Sum: No
Visible: Yes
[/tt][/blue]


Duane
Hook'D on Access
MS Access MVP
 
it doesn't know what the control source is , when I run the report it has a pop up that is asking what is the parameter =1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top