Results 1 to 11 of 11
  1. #1
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402

    percentages

    hi All

    i am trying to add a discount as a percentage to an orders form, if my order total is £100 and i give a discount of 10% the order is correctly priced at £90

    if i then add vat @ 20% to this im getting £110??

    it should be £108

    the formula i am using for this is

    =[Orders Details Subform].[Form]![Running Total Txt Box]*[VAT Rate TXT Box]+[Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount])

    [running total txt box] calculates the total order price, vat rate txt box holds the vat percentage, in this case 20% and *(1-[Discount]) then deducts the discount percentage from the order in this case 10%

    any ideas as to what i'm doing wrong.

    many thanks



    steve

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Bit of a guess, but try:
    =(([Orders Details Subform].[Form]![Running Total Txt Box]*[VAT Rate TXT Box])+[Orders Details Subform].[Form]![Running Total Txt Box])*(1-[Discount])
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402
    Hi Bob

    tried that, still get the same result

    Steve

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    How about:
    =
    (([Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount]))*[VAT Rate TXT Box])
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402
    Hi Bob

    tried that and this

    =(([Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount])*[VAT Rate TXT Box]+[Orders Details Subform].[Form]![Running Total Txt Box])) still no joy

    i have also changed the feild type from single to double but that mad no difference either.

    Steve

  6. #6
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Step by step, I hope.

    =[Orders Details Subform].[Form]![Running Total Txt Box] is your taxable total, pre-discount. (L100.00)

    =[VAT Rate TXT Box] is your VAT rate. (0.20)

    =[Discount] is your discount rate (0.10)

    =(1-[Discount]) is the percentage remaining after discount. (0.90)

    =[Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount]) is the taxable total, post-discount. (L90.00)

    =[Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount])*[VAT Rate TXT Box] is the discounted VAT amount. (L18.00)

    =[Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount])+[Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount])*[VAT Rate TXT Box] is the total amount due. (L108.00)

    =[Orders Details Subform].[Form]![Running Total Txt Box]*(1-[Discount])*(1+[VAT Rate TXT Box]) is also the total amount due. (L108.00)

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    I've stopped guessing. This works for me:
    =(([Orders Details Subform].[Form]![Running Total Txt Box]*[VAT Rate TXT Box]+[Orders Details Subform].[Form]![Running Total Txt Box]))-(([Orders Details Subform].[Form]![Running Total Txt Box]*[VAT Rate TXT Box]+[Orders Details Subform].[Form]![Running Total Txt Box])*[Discount])
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Bob's should work. It amounts to this

    = T*V+T -(T*V+T)*D

    which becomes this

    = (T*V+T)*(1-D)
    = T*(1+V)*(1-D)

    which is mathematically the same as my last two

    =T*(1-D) + T*V*(1-D)
    =T*(1-D)*(1+V)

    Bet you never thought you'd use algebra again...

  9. #9
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402
    Hi Bob and Dal

    sorry for not getting back sooner,

    been tearing my hair out over this, i inherited this database from a new client, and the table structure and calculations on a large percentage of the forms have proved to be very dubious to say the least. "not sure i would rely on them for my VAT return!!!!!

    any way, i have spent the most part of the day redesigning and redoing the calculations and the formula now works Woop Woop.

    im just looking forward to the other nasty surprises lol

    many thanks for all your replies

    Steve

  10. #10
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by Dal Jeanis View Post
    Bob's should work. It amounts to this

    = T*V+T -(T*V+T)*D

    which becomes this

    = (T*V+T)*(1-D)
    = T*(1+V)*(1-D)

    which is mathematically the same as my last two

    =T*(1-D) + T*V*(1-D)
    =T*(1-D)*(1+V)

    Bet you never thought you'd use algebra again...
    Looks like I should have paid more attention to those lessons that were such a long time ago.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  11. #11
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    I was wondering why the VAT amount calculated wasn't going actually into a field somewhere, since presumably you have to pass that money along to the government, as collected...

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

Similar Threads

  1. Percentages Query
    By mabrown81 in forum Queries
    Replies: 12
    Last Post: 11-01-2012, 12:50 PM
  2. Replies: 1
    Last Post: 03-04-2012, 11:22 AM
  3. Rounding Problem With Percentages
    By Lady_Jane in forum Queries
    Replies: 5
    Last Post: 09-01-2011, 02:32 PM
  4. How To Compute Percentages
    By zephaneas in forum Queries
    Replies: 7
    Last Post: 06-20-2011, 12:40 PM
  5. Averaging Percentages in a form
    By DICKBUTTONS in forum Access
    Replies: 1
    Last Post: 11-18-2010, 01:22 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