Problems with IIF

shkrebs

Registered User.
Local time
Today, 16:14
Joined
Jun 7, 2002
Messages
60
Q: Is it not possible to use IIF to "modify" the same field as it's testing?
Exampel: In a report I want a 0 if the field is empty. I'm using this syntax in the source-property-field: =IIF(ISNULL([field1]),0,[field1])

Field1 is of the type: Currency

Pls. tell me where I'm doing wrong :-)

Regards from Spain
 
if you are referring to a textbox control on a report, and if I understand your situation. You added the textbox control from the field list for the report, so the textbox control is probably named field1.

I think what will probably help is to change the name property for your textbox to something like txtfield1. That way you aren't creating circular reference. The [field1] in your iif statement will be referring to the actual field value from your table/query instead of the textbox control.

I hope this makes sense. Let me know if you need further assistance.
 
Hi CharityG...

Yes, I think this is it - problems with circular references - thanks.
Now I just have to "play a little" with the parametres so I get the right numbers in my fiels.

Sorry that I expressed myself a little clumsy. I've been here in spain one year now and it's amasing how fast you forget an language (english) when you don't use it. All the programs on this stupid pc is in Spanish so I simply don't remember the English therms anymore :-))

Regards
A viking in spain.
 

Users who are viewing this thread

Back
Top Bottom