Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can someone tell me what's wrong with this formula? 1

Status
Not open for further replies.

JasGrand

Programmer
Jan 8, 2003
144
CA
Hello, i have the following formula and I was wondering if anyone knew why it won't let me put multiple if statements?

WhilePrintingRecords;
Shared NumberVar TOTAL_INI_1;
Shared NumberVar TOTAL_INI_2;
Shared NumberVar TOTAL_INI_3;
Shared NumberVar TOTAL_INI_4;
Shared NumberVar TOTAL_INI_5;
Shared NumberVar TOTAL_INI_6;
Shared NumberVar TOTAL_INI_7;
Shared NumberVar TOTAL_INI_8;
Shared NumberVar TOTAL_INI_9;
Shared NumberVar TOTAL_INI_10;
Shared NumberVar TOTAL_INI_11;
Shared NumberVar TOTAL_INI_12;
Shared NumberVar TOTAL_INI_13;

if not isnull({#total_1}) then
TOTAL_INI_1 := {#total_1}
else
TOTAL_INI_1 := 0
if not isnull({#total_2}) then
TOTAL_INI_2 := {#total_2}
else
TOTAL_INI_2 := 0
if not isnull({#total_3}) then
TOTAL_INI_3 := {#total_3}
else
TOTAL_INI_3 := 0
if not isnull({#total_4}) then
TOTAL_INI_4 := {#total_4}
else
TOTAL_INI_4 := 0
if not isnull({#total_5}) then
TOTAL_INI_5 := {#total_5}
else
TOTAL_INI_5 := 0
if not isnull({#total_6}) then
TOTAL_INI_6 := {#total_6}
else
TOTAL_INI_6 := 0
if not isnull({#total_7}) then
TOTAL_INI_7 := {#total_7}
else
TOTAL_INI_7 := 0
if not isnull({#total_8}) then
TOTAL_INI_8 := {#total_8}
else
TOTAL_INI_8 := 0
if not isnull({#total_9}) then
TOTAL_INI_9 := {#total_9}
else
TOTAL_INI_9 := 0
if not isnull({#total_10}) then
TOTAL_INI_10 := {#total_10}
else
TOTAL_INI_10 := 0
if not isnull({#total_11}) then
TOTAL_INI_11 := {#total_11}
else
TOTAL_INI_11 := 0
if not isnull({#total_12}) then
TOTAL_INI_12 := {#total_12}
else
TOTAL_INI_12 := 0
if not isnull({#total_13}) then
TOTAL_INI_13 := {#total_13}
else
TOTAL_INI_13 := 0



Thanks,


Jason
 
Put semicolons after each else clause, as in:

if not isnull({#total_1}) then
TOTAL_INI_1 := {#total_1}
else
TOTAL_INI_1 := 0; // <<------ here

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top