Solved

Totaling 3 fields on form.

Posted on 2002-03-19
4
172 Views
Last Modified: 2013-12-18
I've got 3 numeric/editable fields (Fld1,Fld2,Fld3) on a form, which are totaled into a fourth field (TotFld).
I want to have the total (TotFld) calculated whenever a change is made to any value in fields Fld1, Fld2, or Fld3.  

I'd like to avoid using the 'Form Refresh' property. Possibly performing the calculation in the "Exiting" event of each field???

Can someone provide the Lotuscript and where it needs to be placed to get this to happen.

Thanks,
SAK
0
Comment
Question by:SAK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
ID: 6880759
Copy this to all of the "fld#"

Sub Exiting(Source As Field)
     Dim ws As New NotesUIWorkspace
     Dim note As NotesDocument
     Set note = ws.CurrentDocument.Document
     note.Total = note.FLD1(0) + note.FLD2(0) + note.FLD3(0)
End Sub

And Make the total a computed field.

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6880762
Replace Total with TOTFLD in script so suit your form.
0
 
LVL 1

Author Comment

by:SAK
ID: 6880845
That's exactly what I was looking for.
THanks!
SAK
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6880849
Anytime.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question