IIf statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • towsie
    New Member
    • Jun 2007
    • 28

    IIf statement

    Hi,

    When he IIf statement below is run the following error occurs,

    Runtime Error '3061': Too few parameters. Expected 1.

    IIf((Customer = 'Shell Uk Ltd') and (Participator = 'SHELL UK LIMITED'), (Template_Name = 'Crude - SUKO - ' & Crude.F5), (Template_Name = 'Crude - Third Party - ' & Crude.F5)))

    Thanks

    Towsie
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Try This :

    [CODE=sql]IIf(((Customer = 'Shell Uk Ltd') and (Participator = 'SHELL UK LIMITED')), ( 'Crude - SUKO - ' & Crude.F5), ( 'Crude - Third Party - ' & Crude.F5)) As Template_Name[/CODE]

    Regards
    Veena
    Last edited by Killer42; Feb 21 '08, 01:46 AM. Reason: Added CODE=sql tag

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Just for future reference, towsie, IIF isn't a statement. It's a function. They are not the same thing.

      Comment

      Working...