Selasa, 15 April 2014

RE: [MS_AccessPros] How to total up a column

 

If the classes won't change you can use a few text boxes with control sources like:
 =Sum(Abs(Class="Excel") * [Tuition/Fee])
 =Sum(Abs(Class="Word") * [Tuition/Fee])
 =Sum(Abs(Class="Access") * [Tuition/Fee])
The problem with this solution is that when you add another class type, you will need to add another text box. You could try add a list box with a Row Source like
 
SELECT [Class], Sum([Tuition/Fee]) as TotTuit
FROM [YourTableNameHere]
GROUP BY [Class]
 
Display all the items and columns to create
Access   300
Excel      600
Word     500
 
There are some other options that involve code.
 
Duane Hookom MVP
MS Access
 

From: saigonf7q5@yahoo.com

I have a continuous form that displays a list of employee training information. 1 of the column shows the classes which the employees have taken, another column display the fee or tuition's charged.

I was asked to provide the total fee/tuition charges for each category (class). For example, if 3 employees have taken Excel, 2 employees have taken Word and 1 employee has taken Access, then the form should display something as below.  Is it possible to do a SUM like this? Or the Classes should be broken down into 3 different fields/column?

Thanks

Phucon

 

Employee Name              Class                      Tuition/Fee

Sean                                      Excel                      200

John                                      Excel                      200

Mary                                     Excel                      200

Andrew                                                Word                     250

Jack                                        Word                     250

Jim                                         Access                  300

Excel Charged Total= 600              Word Charged Total= 500             Access Charged Total = 300

 

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

__,_._,___

Tidak ada komentar:

Posting Komentar