Results 1 to 2 of 2
  1. #1
    bkirsch is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    39

    IF(AND Statement in a Form

    I have created a relatively large "if(and" statement in MS Excel and am looking to replicate that equation in Access but keep getting an error saying I have entered a comma without a preceding value or identifier...?



    The equation works perfectly in Excel...

    =IF(AND(I2=TRUE,(F2=1)),H2*0.1,(IF(AND(I2=TRUE,(F2 =2)),H2*0.05,(IF(AND(I2=TRUE,(F2=3)),H2*0.02,(IF(A ND(I2=TRUE,(F2=4)),0,0)))))))


    My attempt to create in Access... "1, 2, 3, 4" are all "ID" of a look up" "Payment_Received" is a check box

    =IF(AND( [Payment_Received] =TRUE,( [Commission Type] =1)), [Monthly Billing Total] *0.1,(IF(AND( [Payment_Received] =TRUE,( [Commission Type] =2)), [Monthly Billing Total] *0.05,(IF(AND( [Payment_Received] =TRUE,( [Commission Type] =3)), [Monthly Billing Total] *0.02,(IF(AND( [Payment_Received] =TRUE,( [Commission Type] =4)),0,0)))))))


    any suggestions would be greatly appreciated

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Main Form If Statement
    By qbc in forum Forms
    Replies: 1
    Last Post: 01-21-2012, 05:27 PM
  2. If Statement in form
    By ismith in forum Forms
    Replies: 3
    Last Post: 12-07-2011, 12:18 PM
  3. Update Statement in form code
    By ksmith in forum Programming
    Replies: 9
    Last Post: 11-07-2011, 12:04 PM
  4. Replies: 7
    Last Post: 08-17-2011, 01:49 PM
  5. Passing Criteria to IN statement from Form
    By stephenaa5 in forum Queries
    Replies: 1
    Last Post: 10-09-2009, 04:02 AM

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