Running Multiple Update Queries

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.
 
G

Guest

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)))
 
G

Guest

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.
 

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