seems easy but it's puzzlin me (if statement)

QuietRiot

Registered User.
Local time
Yesterday, 16:28
Joined
Oct 13, 2007
Messages
71
Ok, I have 3 Account fields: ACCT, PHAC and TACT and I'm trying to just create one single formula field called ACCOUNT.

if all 3 are null or len() < 1 then display "N/A" else I want it to display the actual account.
 
num: Nz([field]) gives you zero if it's null.
text: Nz([field]) gives you "" if it's null.
you could convert numeric fields to strings with: CStr([field]), put the strings together and test for null with Nz().

oh: Nz([textfield], "N/A").
Nz() allows you to specify a value if null.
 
num: Nz([field]) gives you zero if it's null.
text: Nz([field]) gives you "" if it's null.
you could convert numeric fields to strings with: CStr([field]), put the strings together and test for null with Nz().

oh: Nz([textfield], "N/A").
Nz() allows you to specify a value if null.

I believe Nz is for Access though? Not a valid function in Crystal
 
sry riot - did not see that.
 
Ok, I have 3 Account fields: ACCT, PHAC and TACT and I'm trying to just create one single formula field called ACCOUNT.

if all 3 are null or len() < 1 then display "N/A" else I want it to display the actual account.

If they aren't all 3 null, will more than one be filled at any one time?

what's the Len()<1 part mean? What datatype are these fields and what can possibly be in them?
 
If they aren't all 3 null, will more than one be filled at any one time?

what's the Len()<1 part mean? What datatype are these fields and what can possibly be in them?

Only one of the fields will be filled at one time. They are text fields and i use Len()<1 but isnull() should also work. For most of the stuff I use both isnull() and len()<1
 

Users who are viewing this thread

Back
Top Bottom