Results 1 to 5 of 5
  1. #1
    bellevue is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2012
    Posts
    61

    Calculating a negative number

    I have a field on my form that calculates the card charges for each payment a customer makes (the control source is below):



    =IIf([Method]="Card",(([Amount]/100*3.4)+0.2),0)

    On this basis of a payment of £50.00 would return a value of £1.90 for card charges and that's all good.

    However, if I refund that £50.00 payment to the customer and enter "-£50.00" in the Amount field, the card charges show up as "-£1.50" which obviously isn't right.

    I understand why it's doing this but wonder if someone could tell me what I need to do to make sure the card charges (for refunds (negative amounts)) comes up with the correct amount please ?

    Thanks

  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,722
    I think you'll have to tell us how Card charges relate to Refunds.
    You have said that if Method = Card....., but we know nothing of your set up for Refunds.

  3. #3
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Perhaps something like this:


    =IIf([Method]="Card",IIF([Amount]<0, -1*((ABS([Amount])/100*3.4)+0.2),(([Amount]/100*3.4)+0.2)),0)

  4. #4
    bellevue is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2012
    Posts
    61
    Thanks so much jzwp11, you're a star, that's cracked it !

    Best wishes

  5. #5
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome

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

Similar Threads

  1. Converting negative number to positive using QBE??
    By shabbaranks in forum Queries
    Replies: 5
    Last Post: 03-23-2012, 08:57 AM
  2. Sum Negative Numbers In Colum
    By geraldselectric in forum Access
    Replies: 1
    Last Post: 01-16-2012, 03:42 PM
  3. Replies: 2
    Last Post: 11-22-2011, 11:45 AM
  4. Replies: 7
    Last Post: 10-26-2011, 01:47 PM
  5. Sum Of Positive Number and Negative Number
    By maysamab in forum Reports
    Replies: 1
    Last Post: 10-20-2008, 04:06 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