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 / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

IIF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pgarcia - 27 Feb 2007 21:23 GMT
This works for me: Expr10: IIf([Billing Term]="Collect",[Destination])
but how do I do the following or can I?
Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name]  "COD" isNot
[Billing Term]"Collect",[Destination])
Joe - 27 Feb 2007 21:39 GMT
When you write your IIF think of it like this... IIF ( Condition, then do
something, otherwise do this) and they can be nested like...  IIF (
Condition, then do something, IIF ( Condition, then do something, otherwise
do this))
Not sure what you are trying to accomplish in the second part of that
statement, but it seems as though you have a ")" out of order
Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name]  "COD" isNot
[Billing Term]"Collect",[Destination])
try moving it to the end like...
Expr10: IIf([Billing Term]="Collect",[Destination],IIf( [Name]  "COD" isNot
[Billing Term]"Collect",[Destination]))
I don't know that it will work because the second IIf( [Name]  "COD" isNot
[Billing Term]"Collect"...doesn't make sense.
HTH
Signature

Joe

> This works for me: Expr10: IIf([Billing Term]="Collect",[Destination])
> but how do I do the following or can I?
> Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name]  "COD" isNot
> [Billing Term]"Collect",[Destination])
pgarcia - 27 Feb 2007 21:41 GMT
I played around and I got this to work:

IIf([Billing Term]="Collect",IIf([Name]="COD",[Destination])," ")

but can I do this: IIf([Billing Term]="Collect",[Destination]),IIf([Billing
Term]="Collect",IIf([Name]="COD",[Destination])," ")

> When you write your IIF think of it like this... IIF ( Condition, then do
> something, otherwise do this) and they can be nested like...  IIF (
[quoted text clipped - 15 lines]
> > Expr10: IIf([Billing Term]="Collect",[Destination]),IIf( [Name]  "COD" isNot
> > [Billing Term]"Collect",[Destination])
Joe - 27 Feb 2007 21:57 GMT
Still confused...
> but can I do this: IIf([Billing Term]="Collect",[Destination]),IIf([Billing
> Term]="Collect",IIf([Name]="COD",[Destination])," ")

The logic behind this is not making sense, explain what you are trying to
do, to me this is saying...
if the "billing term" is "collect, then show the "destination"...
but then you close the IIF with the ")" add another comma so it won't work
(syntax error)
think about it like:
IIF ( Condition, then do something, otherwise do this)
and where I have "otherwise do this" you can nest another complete IIF
statement.
---
Joe
pgarcia - 27 Feb 2007 22:06 GMT
Sorry that should have been like this: (but I understand, it works in Excel)

IIf([Billing Term]="Collect",[Destination]),IIf([Billing
Term]="Collect",IIf([Name]="COD",[Destination])," "))

But I got around it.

> Still confused...
> > but can I do this: IIf([Billing Term]="Collect",[Destination]),IIf([Billing
[quoted text clipped - 11 lines]
> ---
> Joe
 
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.