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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple query question - totals & ytd percents 1

Status
Not open for further replies.

gimpy0821

Technical User
Jun 27, 2008
5
US
I've been away from Access for so long - I'm embarrassed. I need a simple query that will create totat count of 1 grouped field and the total ytd % of all records in table.

Anyone have a sample? Thanks
 
I don't think anyone can tell whay you mean by ytd %.

Your table name and field names would be helpful.

There is an Access queries forum where this would be more on topic.
 
I have a table where each row has a unique ticket # that is submitted by a user (EnteredBy). I want to generate a total count of all tickets for EnteredBy and what percent that count is of the total record count of all tickets.

Report would would have a group total for each user as well as their percent of the total tickets:
"EnteredBy" "25 tickets" "100 tickets" "25% of total tickets"

Grand total of tickets at end.
 
I would blend a query and report solution together for this.

Code:
Select EnteredBy, Count(Tickets) As TicketCount
From table
Group By EnteredBy


Save that query and then make a report based off it.

In your report footer make a textbox whose control source as below

Code:
=Sum(TicketCount)

Name that text box txtTotalTicketCount.

In your detail section you will have controls for EnteredBy, TicketCount.

Your percentage can be found with the below.

Code:
=TicketCount / txtTotalticketCount

txtTotalticketCount is of course your grand total at the end.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top