Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2006

Tip: Looking for answers? Try searching our database.

Running Multiple Update Queries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jurrasicway - 29 May 2006 08:41 GMT
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.
Ofer Cohen - 29 May 2006 13:23 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.