• IIF statement (A2k)

    Author
    Topic
    #407080

    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

    Viewing 1 reply thread
    Author
    Replies
    • #848674

      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.

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

    • #848675

      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.

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

    Viewing 1 reply thread
    Reply To: IIF statement (A2k)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: