Imediate IF problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi either of these Formulas still results in a null value in column
Description2 against the value "TEXT" in column Descripton

Description2: IIf("TEXT"([RF].[Description]),"TEXT LINE - TO
REFER",[RF].Description])

Description2: IIf(([RF].[Description])="TEXT","TEXT LINE - TO
REFER",[RF].Description])

The Else factor is fine, however I am not sure why it is ignoring the first
set of criteria.

Thanks in advance for any help

Andi
 
Please describe what you're trying to do.... the examples you've posted are
not clear to us.
 
Andi,
The second IIf looks OK, but the syntax is off. I've found that if I use
only really, really necessary parenthesis, it works better. Also don't
forget the preceding brackets. Ex:

Description2: IIf([RF].[Description]="TEXT","TEXT LINE - TO
REFER",[RF].[Description])

see if that's better.
 
hi there,

Tried your formula.
It brought back an error with your formula.

"The Expression You entered contains invalid syntax. You May have entered an
operand without an operator" - Which I think means not enough Parenthyses

EXMPLE of correct formula:

IIF(IS Null([Field1]),0,([Field1])

or

IIF(NZ([Field1]),0)

In answer to the other response.

It's an append querry which updates products from an imported table to my
main parts details table. Where the words "TEXT"appear in the Description
field it should be transposed to before updating "TEXT - REFER TO etc" else
it returns the proper description.

Thanks

Andi


Michele L said:
Andi,
The second IIf looks OK, but the syntax is off. I've found that if I use
only really, really necessary parenthesis, it works better. Also don't
forget the preceding brackets. Ex:

Description2: IIf([RF].[Description]="TEXT","TEXT LINE - TO
REFER",[RF].[Description])

see if that's better.

Andi Lee Davis said:
Hi either of these Formulas still results in a null value in column
Description2 against the value "TEXT" in column Descripton

Description2: IIf("TEXT"([RF].[Description]),"TEXT LINE - TO
REFER",[RF].Description])

Description2: IIf(([RF].[Description])="TEXT","TEXT LINE - TO
REFER",[RF].Description])

The Else factor is fine, however I am not sure why it is ignoring the first
set of criteria.

Thanks in advance for any help

Andi
 
All solved now.

the first criteria was looking at the Description istead of the part number.

So this is correct

Description2: IIf(([RF].[Product])="TEXT","TEXT LINE - TO
REFER",[RF].[Description])

Thanks for you help anyway.

Andi

Andi Lee Davis said:
hi there,

Tried your formula.
It brought back an error with your formula.

"The Expression You entered contains invalid syntax. You May have entered an
operand without an operator" - Which I think means not enough Parenthyses

EXMPLE of correct formula:

IIF(IS Null([Field1]),0,([Field1])

or

IIF(NZ([Field1]),0)

In answer to the other response.

It's an append querry which updates products from an imported table to my
main parts details table. Where the words "TEXT"appear in the Description
field it should be transposed to before updating "TEXT - REFER TO etc" else
it returns the proper description.

Thanks

Andi


Michele L said:
Andi,
The second IIf looks OK, but the syntax is off. I've found that if I use
only really, really necessary parenthesis, it works better. Also don't
forget the preceding brackets. Ex:

Description2: IIf([RF].[Description]="TEXT","TEXT LINE - TO
REFER",[RF].[Description])

see if that's better.

Andi Lee Davis said:
Hi either of these Formulas still results in a null value in column
Description2 against the value "TEXT" in column Descripton

Description2: IIf("TEXT"([RF].[Description]),"TEXT LINE - TO
REFER",[RF].Description])

Description2: IIf(([RF].[Description])="TEXT","TEXT LINE - TO
REFER",[RF].Description])

The Else factor is fine, however I am not sure why it is ignoring the first
set of criteria.

Thanks in advance for any help

Andi
 
Back
Top