[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Totaling Values in Custom Fields

Posted on 2003-12-01
3
Medium Priority
?
178 Views
Last Modified: 2010-04-08
Using code, I am having a challenge totaling numbers from 5 different fields and displaying the total in a totals field. When I the following for example:
txtotal = txtNum1 + txtnum2 + txtNum3 + txtNum4 + txtNum5
Let's say that each field is hold the numbers 1 2 3 4 5 respectfully.
The result is 12345. It is concatinating the numbers instead of summing them up.
any ideas on how to do this in code.
0
Comment
Question by:Lorenzog0917
[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 Comments
 
LVL 19

Accepted Solution

by:
Dexstar earned 500 total points
ID: 9851913
@Lorenzog0917:

> txtotal = txtNum1 + txtnum2 + txtNum3 + txtNum4 + txtNum5

Try this:
     txTotal = CLng(txtNum1) + CLng(txtNum2) + CLng(txtNum3) + CLng(txtNum4) + CLng(txtNum5)

Hope That Helps,
Dex*
0

Featured Post

Technology Partners: 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

Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

656 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