Selasa, 09 April 2013

[MS_AccessPros] query Count()

 

I've got a query that displays the people who are assigned for each certain duty. In the report based on that query, I have a text box =Count(*) which lists the total number of people who have each task. I would like to sort these task groupings in the report by the number of people who do these jobs, but in the sort/group section there is no field that can allow me to do that. Can I add an expression to the query so it will appear in the report? SQL follows:

SELECT tblAssignedRoles.AssRoleID, tblRoleList.RoleName, [FirstName] & " " & [LastName] AS [=FullName], Names.LastName, Names.FirstName, tblRoleList.RoleID
FROM [Names] INNER JOIN (tblRoleList INNER JOIN tblAssignedRoles ON tblRoleList.RoleID = tblAssignedRoles.AssRoleID) ON Names.NameID = tblAssignedRoles.AssNameID
WHERE (((Names.Active)=Yes) AND ((tblAssignedRoles.[Yes-No])=Yes))
ORDER BY Names.LastName;

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar