home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
TEXT
/
PDX_ALL.ZIP
/
TI530.ASC
< prev
next >
Wrap
Text File
|
1991-09-11
|
1KB
|
67 lines
PRODUCT : PARADOX NUMBER : 530
VERSION : ALL
OS : DOS
DATE : September 11, 1991 PAGE : 1/1
TITLE : USING SETKEY TO CALCULATE TOTALS WHILE EDITING
The following script demonstrates how to use the PAL SETKEY
command to perform a calculation while in a form. Calculated
fields in forms are display only fields. If you wish to perform
a calculation while in a form and have the resulting answer
appear in the table, then you can use the SETKEY command to
perform the calculations.
If your table currently does not contain a field for the result
of the calculation, then you must first perform a
MODIFY/RESTRUCTURE on the table to add a new field.
SETKEY commands may be defined in a script called init (located
in the same directory as your Paradox program files). The
example below uses the SETKEY command to calculate the value of
Extended Price.
SETKEY 3 [Extended Price]=[Quantity]*[Price]
When the user presses [Ctrl-C] (ASCII value 3), Paradox will
calculate the Extended Price, and place the calculated value in
the extended price field.