Results 1 to 11 of 11
  1. #1
    Join Date
    Sep 2013
    Posts
    7

    Question Unanswered: Need Help in Calulation of addition

    Hello I Need help I want to create a field name Total KG which is sum of current kg amount +previous total kg = new kg amount
    my table is as

    Date
    Product Name
    Quantity (for example current qty 10kg)
    Total Quantity (10kg of this record + previous total kg) how to do ???
    Rate (average Rate = total amount / total kg of previous records)

  2. #2
    Join Date
    Nov 2011
    Posts
    413
    Total KG = Sum([kg]+[total kg])

    HTH

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    im not sure your average calcualtion is correct there...

    there is a domain function that will calcualte average for you, its called DAVG
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Sep 2013
    Posts
    7
    how can we use it DAVG

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    its a domain function
    so without looking it up Id expect
    davg("column to average","table or query name", "domain or filter")
    but I may have got that wrong, so look up MS Access DAVG function
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Sep 2013
    Posts
    7
    yes its not working it tried

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what did you try
    when you say its not working what was the result your got, and why was it different to the result you expected
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Sep 2013
    Posts
    7
    first of all I tried for total KG its not working its giving the error for select error
    and also error in Davg funtion
    here is my attached database
    Attached Files Attached Files

  9. #9
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Where is the Form at where you've been trying to do this? There's nothing in the file you posted except a Table!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  10. #10
    Join Date
    Sep 2013
    Posts
    7
    I deleted the form due to no query is not working for total kg field as well avg rate field
    will u modify it if u dont mind

  11. #11
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so your problem is in a form, so you posted your application for assistance
    bu you deleted the form that you had the porblem with

    its hardly reasonable to expect contributors here to design your form for you
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •