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

Coding question to sum all records 1

Status
Not open for further replies.

eon5

Technical User
Dec 31, 2007
47
ZA
I have created a form with the following information;


Key field1 field2
Records ID: Expense1: Expense2:
001 R20 R25
002 R15 R10

Of course the form is displaying only one record at a time with the values of Expense1 and Expense2 in it. In the one corner of the form I have created a text box displaying the sum of the two expenses.

“ = [Expense1] +[Expense2] = R45 “

All of this is working perfectly, but how do I code another text box on the same form displaying the total value for expense 1 and 2 for all the records entered thus far. In other words the text box should read R70.

Thanks
Eon5
 
Hi Eon5,

What application? If Word, are these textbox formfields?

Cheers

[MS MVP - Word]
 
It is an Access application
Thanks
 
You may use the DSum function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the advice, i will give it a go

eon5
 
Thanks PHV, it workds perfectly

eon5
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top