Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IIF statement (A2k)

    I would like to make including the field [tblOrg.strOrgOffice] in an address block conditional on the value of another field [tblAddrShp.strTypeSource] and I'm not sure how to handle the True condition which would mean not including it. Does the following get the job done or does it need to be revised?

    IIf([tblAddrShp.strTypeSource] = Home),,[tblOrg.strOrgOffice])

    E

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: IIF statement (A2k)

    String values must be enclosed in quotes.
    There should not be a closing parenthesis after Home, since the IIf instruction is not finished yet.
    You must provide a value for the True part.
    You must enclose each of the parts of tblAddrShp.strTypeSource in square brackets, and similar for tblOrg.strOrgOffice.

    <code>IIf([tblAddrShp].[strTypeSource]="Home",Null,[tblOrg].[strOrgOffice]) </code>

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IIF statement (A2k)

    Thanks. Works perfectly.

    E

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •