Results 1 to 4 of 4
  1. #1
    emir is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Nov 2015
    Posts
    4

    Function error


    Hello, I have a problem. When I try to start my query, it show me error: the expression you entered has a funkcion containing the wrong number of arguments.
    test:PTP Kept Amount: IIf([Absorbing]![Partija] is null and [Cash Collected]>=[PTP=DUG],[PTP=DUG],[Cash Collected], iif([Absorbing]![Partija] is not null and [Cash Collected]>=[PTP=DUG],[Cash Collected],[PTP=DUG]))

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    You have joined a thread that is quite old. You may want to start a new thread.

    In plain English what is it you are trying to represent?
    In vba use the IsNull() function.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Structure of the IIf() makes no sense. You have two complete IIf() statements. This is not proper nesting

    Maybe:

    IIf([Absorbing]![Partija] Is Null And [Cash Collected]>=[PTP=DUG], [PTP=DUG], [Cash Collected])


    Advise no spaces or special characters/punctuation (underscore is exception) in names.

    NOTE: split post to new thread.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    How about
    IIf([Absorbing]![Partija] is null and [Cash Collected]>=[PTP=DUG],[PTP=DUG],iif([Absorbing]![Partija] is not null and [Cash Collected]>=[PTP=DUG],[Cash Collected],[PTP=DUG]))

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

Similar Threads

  1. Replies: 8
    Last Post: 01-31-2014, 01:45 PM
  2. #Error, from DFirst Function
    By mike02 in forum Access
    Replies: 7
    Last Post: 06-20-2013, 02:36 PM
  3. Error in Function
    By Alex Motilal in forum Programming
    Replies: 2
    Last Post: 10-11-2011, 06:30 AM
  4. VBA - Using GetObject function - get error.
    By jsbotts in forum Programming
    Replies: 7
    Last Post: 10-10-2011, 07:51 AM
  5. aggregate error due to function
    By boutwater in forum Access
    Replies: 2
    Last Post: 09-26-2011, 03:39 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