Problem using "Iif"

B

Box666

I am using the following to generate a select query

NewSel:IIf(([crdw] Or [selcal])=" ";"
";IIf([crdw]>=[SelCal];[crdw];[SelCal]))

also tried

NewSel:IIf(IsNull([crdw] Or [selcal]);"
";IIf([crdw]>=[SelCal];[crdw];[SelCal]))

it gives a #Error answer. In the above [crdw] is a table field but
[SelCal] is a calculated field.

It does not seem to be recognising the OR statement, how is the best
way to resolve this please.


Bob
 
B

Brendan Reynolds

You need to provide the complete conditional expression on either side of
the 'Or', e.g. ...

IIf(([drdw] = " " Or [selcal] = " "

.... and ...

IIf(IsNull([crdw]) Or IsNull([selcal])
 

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