Running Multiple Update Queries

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

Guest

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)))
 
Thanks, it works fine

Regards,

Graeme.

Ofer Cohen said:
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)))


--
Good Luck
BS"D


Jurrasicway said:
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.
 
Back
Top