Results 1 to 2 of 2
  1. #1
    Frannilea is offline Novice
    Windows 10 Access 2007
    Join Date
    Jul 2020
    Posts
    27

    Question Expression Builder - wrong number of arguments


    Hi!

    I'm going cross-eyed. Sorry! I'm a beginner. What the heck is wrong with this expression??

    =Sum(IIf(([WordList]![NumListAttempt]>24 And [WordList]![NumSccssList]<10) Or ([WordList]![NumSccssRec]>10 And [WordList]![NumSccssList]<16,1,0)))


    I just want it to count the number of rows and insert the result. I have about 10 of these on one form, but this one isn't working. I added the extra bit in red plus an extra set of brackets. It's supposed to work like (a & b) or (c & d). I tried adding the bit in blue after "b" also. Nothing seems to work.

    =Sum(IIf([WordList]![NumSccssList]>9 And [WordList]![NumRecAttempt]>24 And [WordList]![NumSccssRec]<10,1,0))

    If found a basic expression like this one =Sum(IIf([WordList]![NumSccssList]<16,1,0)), and have managed to work out how to expand it to suit my needs, like the the one immediately above, and many expressions similar works on my form, but the previous one doesn't.

    Thanks in advance! :-)

  2. #2
    Frannilea is offline Novice
    Windows 10 Access 2007
    Join Date
    Jul 2020
    Posts
    27
    Ah! I finally worked it out for myself! (I spent over an hour before I posted, lol!) I must have needed that coffee break!

    =Sum(IIf(([WordList]![NumListAttempt]>24 And [WordList]![NumSccssList]<10) Or ([WordList]![NumSccssRec]>10 And [WordList]![NumSccssList]<16),1,0))

    This one works! :-)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Wrong number of arguments
    By Perfac in forum Programming
    Replies: 10
    Last Post: 05-20-2020, 05:52 PM
  2. Replies: 5
    Last Post: 03-20-2018, 06:52 PM
  3. function has the wrong number of arguments
    By Darla in forum Programming
    Replies: 6
    Last Post: 02-09-2017, 02:03 PM
  4. Replies: 3
    Last Post: 09-09-2015, 11:26 AM
  5. Replies: 3
    Last Post: 02-12-2014, 03:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums