IIf function to use field value

G

Guest

Hi,

I have an IIf function that checks the value of a field and if that is null,
I want to use the value of another field:
Volume: IIf([Net Merch] Is Null,[Allocation],[Net Merch])
Both Allocation and Net Merch are field within the same query.

I will also have to nest some other Iif statements but I can't figure out
how to get the field values in there. It gives me the 'Enter Parameter
Value' box with 'Allocation' and a text box to fill in.

Thanks!
 
D

David F Cox

This has the symptoms of [Allocation] not being there.

paste the code and the SQL if you are sure that there are no spelling
errors, extraneous blanks etc.
 
S

Steve Schapel

Ehunter,

I agreee with David, that this would indicate that the Allocation field
is not in the query, or that you have a spelling error.

Also, I would point out that you can use the Nz() function for this
purpose...
Volume: Nz([Net Merch],[Allocation])
 

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