Results 1 to 9 of 9
  1. #1
    kallu is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    May 2017
    Posts
    10

    Angry Add calculated results on table

    Hi there.


    I have Continuous Forms, to select article for customer, I have unbound text box to discount from total price. Example total price is $14, and I want to discount $4, after that i want $4 discount, to separate on article.
    I have code to separate discount, (Discount=([Discount1]/[Sum1]*[Sum]), but I can't populate all rows, on bound textbox, to save it on main table.
    I try this but not successed:

    Me.CalculateDiscount = Me.Discount
    Me.CalculateDiscount.Value = Me.Discount.Value

    This populate only one row on continuous form. Only row which I moved cursor to txt Discount1. I tried also to refresh form but not succesed.
    I attach sample database to understand easy this problem.TextBox populate problem.zip

    Can anybody help me to solve this?

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Calculated fields are NEVER stored on tables. Display the value by putting the calculation in the control source property, and then use queries to calculate it whenever you need it.

  3. #3
    kallu is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    May 2017
    Posts
    10
    I tried to calculate on query,but I can't find formula to divide discount with sum of total amount of order, and results to sum with sum of one article. Discount with total amount I have in one table and orders on another table.
    Discount=Discount1/Sum1*Sum.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I am unable to download your attachment, it says that the file is empty.

  5. #5
    kallu is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    May 2017
    Posts
    10
    Firs attached file was converted from win rar.
    Attached Files Attached Files

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I wasn't happy with your table setup and created some of my own. Also forms and queries. See how this works for you.
    Attached Files Attached Files

  7. #7
    kallu is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    May 2017
    Posts
    10
    Thanks 4 replay and trying to help me. Idea was to discount from total price. Example total price for one order with multiple article is , $22.5, and I want to discount only $2.5, (reason: total price for pay, to be fixed), and this discount to bee parted on articles, based on article price.
    (Example: Total price is 22.5, First article is $2.5, second $9, and third $11. Discount of $2.5 will parted like this: for first article $2.5-$0.28, second $9-$1, and third $11-$1.22. $0.28+$1+$1.22=$2.5.)
    I don't know if this possible or not.

  8. #8
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    See if this is what you are trying to accomplish.
    Attached Files Attached Files

  9. #9
    kallu is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    May 2017
    Posts
    10
    Thanks Ayte, this is exactly, what I am looking 4.
    This is a good forum, I will visit regularly.
    Thank you very much.

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

Similar Threads

  1. Replies: 19
    Last Post: 09-25-2016, 05:37 AM
  2. Calculated field on results in the same query
    By becka11 in forum Queries
    Replies: 1
    Last Post: 05-07-2013, 05:11 PM
  3. Replies: 1
    Last Post: 06-26-2012, 05:02 PM
  4. Replies: 3
    Last Post: 06-26-2012, 02:54 PM
  5. Replies: 3
    Last Post: 03-03-2012, 10:39 PM

Tags for this Thread

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