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

how to get the sum of the same items

Status
Not open for further replies.

thinkthank

IS-IT--Management
Mar 18, 2004
4
A2
Hi all:
I will be happy if some one help me how to find a solution for this:

how to get the sum of the same items from the different ones that i filled in the form.

thnx.

 
Suppose you have six text boxes on a form named 'One' through "six" If you put numbers in five of them and want the sum in the sixtth you would code this under a command button click event.

private command0_click()

me.six = me.one+me.two + me.three+me.four+me.five

msgbox "The sum of the five are " & me.six

exit sub


rollie@bwsys.net

 
thnx for u r reply, but what i wanna excatly like this (sort the sum):

A=1
B=5
A=3
C=7
A=2



so at last how to have a report that show me the total (sum) of each of A=6 ,B5, C=7.
what i mean like this, hoping to reply.
thanx
 
ThinkThank,

What I came up with for your problem is to create a query for each of the corresponding letters. In the query design mode, right click in the lower pane and select the Totals button. In the fields I have SCORE: Group By and GRADE: SUM in the respective Total fields.

Once this is done you should be able to add as many records to the Score A, B, and C with the math being done in the query. Once you want to know the totals you simply select your report, which you must link to the queries, to view the data.

I hope that helps.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top