Need correct conditional statement language

  • Thread starter Thread starter Cloudbuster
  • Start date Start date
C

Cloudbuster

I want to make the following into a conditional statement. Please let me know
exactly how it should look. The basic formula is as follows:

Balance (column name): IIF ([field name1]>$0.00, then [field name2]-[field
name1] OR

IIF [field name]1=$0.00 or NULL AND IIF [field name3]<=$0.00 or NULL, then
[field name2] OR

IIF [field name1]=$0.00 or NULL AND IIF [field name3]>$0.00, then [field
name2]-([field name3]+[field name4])
 
Cloudbuster,

Balance (column name): IIF ([field name1]>$0.00, [field name2]-[field
name1],IIF [field name]1=$0.00 or [field name] is NULL AND [field
name3]<=$0.00 or [field name3] is NULL, [field name2], IIF [field
name1]=$0.00 or [field name1] is NULL AND [field name3]>$0.00, [field
name2]-([field name3]+[field name4],"you are missing this last
argument--''What if none of the conditions are met?''")

Notice my little note in there at the very end. Replace my note (everything
between and including the double quotes) with a zero or a field name or
calculation or your own message (your own message or any text would require
double quotes).

HTH,

Conan
 
Conan,

That last formula you gave me was not quite correct, b/c the query says
there is a syntax error (comma) in the formula. Here's how it looks now

Balance: IIf([Full Payment]>0,[Amt]-[Full Payment],IIf([Full Payment]=0 Or
[Full Payment] Is Null And [Partial Payment]<=0 Or [Partial Payment] Is
Null,[Amt],IIf([Full Payment]=0 Or [Full Payment] Is Null And [Partial
Payment]>0,[Amt]-([Partial Payment]+[AmtOfRecoveryFee],"0"))))
--
Cloudbuster


Conan Kelly said:
Cloudbuster,

Balance (column name): IIF ([field name1]>$0.00, [field name2]-[field
name1],IIF [field name]1=$0.00 or [field name] is NULL AND [field
name3]<=$0.00 or [field name3] is NULL, [field name2], IIF [field
name1]=$0.00 or [field name1] is NULL AND [field name3]>$0.00, [field
name2]-([field name3]+[field name4],"you are missing this last
argument--''What if none of the conditions are met?''")

Notice my little note in there at the very end. Replace my note (everything
between and including the double quotes) with a zero or a field name or
calculation or your own message (your own message or any text would require
double quotes).

HTH,

Conan






Cloudbuster said:
I want to make the following into a conditional statement. Please let me
know
exactly how it should look. The basic formula is as follows:

Balance (column name): IIF ([field name1]>$0.00, then [field name2]-[field
name1] OR

IIF [field name]1=$0.00 or NULL AND IIF [field name3]<=$0.00 or NULL, then
[field name2] OR

IIF [field name1]=$0.00 or NULL AND IIF [field name3]>$0.00, then [field
name2]-([field name3]+[field name4])
 
Back
Top