urgent please help!! abt calculations

Results 1 to 2 of 2

Thread: urgent please help!! abt calculations

  1. #1
    Join Date
    Dec 1969

    Default urgent please help!! abt calculations

    hi all<BR><BR>i am displaying records and each record has a amount and at the end i want to show the<BR>total of all amount.<BR><BR>say like this.<BR><BR>name amount<BR><BR>george $10<BR>mark $50<BR>ben $40<BR><BR><BR>total $100<BR><BR>also please note, sometimes 1 record might be displayed or even 5 records or 10 records.<BR><BR>say like<BR><BR>george $10<BR>ben $40<BR><BR>total $50<BR><BR>the records are displayed using<BR><BR>do while not rst.eof<BR><BR>loop<BR><BR>awaiting your reply<BR><BR>cheers guys<BR>ray

  2. #2
    Pat Potier Guest

    Default RE: urgent please help!! abt calculations

    You can store your running total in a session variable. Init the variable, such as total to zero before your loop logic. In the loop, you can insert the following:<BR>session("Total") = session("Total") + amount<BR>At the end of the loop, display session("Total")<BR><BR>I hope I understood your problem correctly. If so, this should work.<BR><BR>PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts