Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Apr 2005
    Location
    Plovdiv
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syntax error (Access 2000)

    What is wrong with my query ? The following IIF clause is not accepted :
    NetPrice :,IIF(Nz([size] > 20; [ddp]*[cartons]; [ddp]*[size]*[quantity])
    The condition is : If size > 20 then ddp*cartons else ddp*size*quantity

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

    Re: Syntax error (Access 2000)

    There shouldn't be a comma before IIf, and you forgot the closing parenthesis for the Nz function,
    <code>
    NetPrice: IIf(Nz([size],0) > 20; [ddp]*[cartons]; [ddp]*[size]*[quantity])
    </code>
    Note for others: spiesser uses a system on which the semicolon is used as list separator (the comma is used as decimal separator).

Posting Permissions

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