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: 
Luke - 27 Feb 2007 12:18 GMT
hello all

We have clients that we mail to, each client has a ID.  However, they can
nominate another client as a representative who we mail instead.  Therefore,
I need a query to use the Representative ID (if it exists), If there is no
Representative ID, to use Client ID.

My first effort doesnt work at all

Person:
IIf([tblClients.RepresentativeID]=True,IIf(([tblClients.RepresentativeID]=Null,[tblClients.ClientID]),([tblClients.RepresentativeID]=Null),[tblClients.RepresentativeID]))

And this 2nd effort doesnt give me a client ID if a representative ID exists.

Person:
IIf([tblClients.RepresentativeID]=True,IIf(([tblClients.RepresentativeID]=Null,([tblClients.RepresentativeID]=Null),[tblClients.RepresentativeID]))

Am I using the correct type of query?
Rick Brandt - 27 Feb 2007 12:32 GMT
> hello all
>
[quoted text clipped - 15 lines]
>
> Am I using the correct type of query?

Nz(RepresentativeID, ClientID)

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Luke - 27 Feb 2007 13:17 GMT
Superb! many thanks!

> > hello all
> >
[quoted text clipped - 17 lines]
>
> Nz(RepresentativeID, ClientID)
 
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.