I have three update queries updating Letters to Numbers to produce a graph.
Origin Field > [Bank]
Update Field > [UBank]
Criteria =
if a "G" is in the field a number of 0 is allocated
if a "A" is in the field a number of 5 is allocated
if a "R" is in the field a number of 10 is allocated
To make one query do the same job I have entered
IIF([Banking]="G",0,IF[Banking]="A",5,IF([Banking]="R",10,0)))
but I get an error message of undefined if in expression. The query will
not update. However, when I view the query the code replaces G with 0, A with
5 and R with 10.
You started with IIf but then you moved to If
Yours
IIF([Banking]="G",0,IF[Banking]="A",5,IF([Banking]="R",10,0)))
Try
IIF([Banking]="G",0,IIF[Banking]="A",5,IIF([Banking]="R",10,0)))

Signature
Good Luck
BS"D
> I have three update queries updating Letters to Numbers to produce a graph.
> Origin Field > [Bank]
[quoted text clipped - 8 lines]
> not update. However, when I view the query the code replaces G with 0, A with
> 5 and R with 10.
Jurrasicway - 29 May 2006 15:06 GMT
Thanks, it works fine
Regards,
Graeme.
> You started with IIf but then you moved to If
>
[quoted text clipped - 16 lines]
> > not update. However, when I view the query the code replaces G with 0, A with
> > 5 and R with 10.