Results 1 to 6 of 6
  1. #1
    baxton28 is offline Novice
    Windows 11 Access 2013 32bit
    Join Date
    Jul 2022
    Posts
    2

    how do i show £0.00 in a Total Discounted Price field when the Discount is 0?

    Hi Everyone, been a while since I've used access and stumbled on a quandary.
    I'm setting up a costings Db for my business and I have gotten stuck on an issue with discounts and total discount price

    I have a costings form, with client details and also totals to be populated from a materials subform run on a qry.
    issues I'm having is on the discounts side.

    Fields:
    [Price_ea] [QTY] [Totalcost] [Discounts] [totalDiscPrice]

    so if I enter a [Price_ea] £5.00 [QTY] of 1 [totalcost] £5.00 [discount] 10% [totalDiscPrice] £4.50
    the above is ok
    If I don't have a discount% on a price, which will be 0 in the field, the [TotalDiscPrice] shows the [Totalcost] so when I come to calculate the the whole of the [TotalDiscPrice] its including the the amounts which has no discount.
    so i suppose long story short, how do i show £0.00 in the TotalDiscPrice when the Discount is 0?



    formulas
    [Price_ea]*[QTY] = [TotalCost]
    TotalDiscPrice: ([TotalCost]-[TotalCost]*[Discounts]/100)

    hope this makes sense?
    kind regards Baxton
    Access 2013 win11Click image for larger version. 

Name:	Screenshot 2022-07-13 131527.png 
Views:	11 
Size:	7.9 KB 
ID:	48310

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    Try: TotalDiscPrice: ([TotalCost]-[TotalCost]*Nz([Discounts],0)100)
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #3
    baxton28 is offline Novice
    Windows 11 Access 2013 32bit
    Join Date
    Jul 2022
    Posts
    2
    Hi Mike thankyou for replying to my thread, ok i just had a go,ive inputted the NZ as suggested in the qry and the TotalDiscPrice still displaying the TotalCost amount...hummmm

  4. #4
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    Sorry my mistake

    Looking at your screenshot it looks like you have entered the discount values as whole values vice Percentages.

    The Discounts should be set using a combobox

    The Formulae you need is as follows:- =[TotalCost]-([TotalCost]*[cboDiscount].[Column](1))
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    maybe just TotalDiscPrice: IIF([Discounts]=0,0,[TotalCosts]-[Discounts])

    I can't tell how you're calculating the discount amount so the bold part probably needs adjusting.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    If you can upload the database so we can see the structure of the Form it would help.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

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

Similar Threads

  1. Replies: 3
    Last Post: 10-30-2018, 09:48 AM
  2. Replies: 3
    Last Post: 03-27-2017, 05:56 AM
  3. Replies: 2
    Last Post: 10-02-2013, 11:14 AM
  4. Calculate Discounted Price
    By tia in forum Access
    Replies: 1
    Last Post: 11-20-2011, 12:37 AM
  5. Yearly Discount Price By 20%
    By vdanelia in forum Forms
    Replies: 1
    Last Post: 02-04-2011, 10:27 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