Need correct conditional statement language

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])
 
C

Conan Kelly

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
 
C

Cloudbuster

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])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top