Alpha Developers Network

Guest


Author Topic: how to multiply 2 fields to get a total in a field  (Read 522 times)

0 Members and 1 Guest are viewing this topic.

glazier

  • Guest
how to multiply 2 fields to get a total in a field
« on: November 20, 2012, 06:00:52 PM »
Hello

i am trying to multiply 2 fields such as length and width to get total square ft in a field, is there a way to do this

Steve Wood

  • Administrator
  • Expert
  • *****
  • Posts: 706
  • Karma: +11/-0
    • AlphaToGo
  • Real Name: Steve Wood
Re: how to multiply 2 fields to get a total in a field
« Reply #1 on: November 23, 2012, 01:33:47 AM »
the answer depends on where you are trying to make the calculation. Its basically var=Field1 + Field2. If by field you mean you want to store the value in a field in the table, and the two Fields you want to total are in a grid, then perhaps the answer is to add this to your CanInsertRecord event:

dataSubmitted.Field3 = dataSubmitted.Field1+ dataSubmitted.Field2
---
Steve Wood
www.alphatogo.com