Solved

Calculated Fields - How to

Posted on 1998-10-27
2
183 Views
Last Modified: 2010-04-06
Simple question. How do I define and access a calculated field in a table.

I have two field values i want to multiply, with the total going in the calculated field.

Thanks.
0
Comment
Question by:DougBennett
2 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344649
0
 
LVL 2

Accepted Solution

by:
Thaddy earned 10 total points
ID: 1344650
Go to the fields editor.(Doubleclick on the table, then rightclick)
Add the two fields you want to multiply
Then, create a new field, set its type to calculated.
and its fieldtype to float. We'll call it 'Calc'
Then, on the OnCalcFields event of the table, use something like:
with table1 do
 FieldByname('Calc').AsFloat:=FieldByName('Field1').AsFloat*FieldByName(Field2').AsFloat;

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now