Results 1 to 3 of 3
  1. #1
    budchevy is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    15

    VBA code to get sum from multiple entries

    I have a form setup that will allow multiple users to enter the number of units they counted. I would like to get the total of those entries and have it auto populate to a total field..

    I also have a seperate place where they can enter an error quantity & a price. I would like to multiply these together to get a seperate total price.

    Not sure how to accomplish this.

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Assuming that all the individual users are entering records into the same table in a shared database, then to get the total of the counts you could probably use the DSum(...) function, perhaps with criteria to sum only the records you want.

    The second part of your question is not very clear - but if you want the sum of ([quantity] * [Price]), where [Quantity] and [Price] are fields in a table, then DSum can do that as well.

    If this does not answer your question, please give some better detail obout what you are trying to do.

    HTH

    John

  3. #3
    budchevy is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    15
    John,
    I have attached 2 of the forms i'm using and here's a list of things I'm trying to accomplish..
    -Need to have FrmULPD fill in the Units Counted field by adding up anything put into the units counted field for each of the auditors, compute the percent complete based on units allocated divided by units counted and then have the total ROI filled in based on all the total ROI fields from the subform
    -In the subform, need to have ROI filled in based on quantity * cost
    Attached Files Attached Files

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

Similar Threads

  1. Multiple Entries
    By alyon in forum Access
    Replies: 2
    Last Post: 05-15-2012, 07:45 AM
  2. Problem with code to prevent duplicate entries
    By ResearchRN in forum Programming
    Replies: 5
    Last Post: 11-08-2011, 12:12 PM
  3. Multiple extra entries
    By EDEd in forum Forms
    Replies: 1
    Last Post: 01-30-2011, 10:59 AM
  4. Multiple entries
    By danelliott in forum Access
    Replies: 3
    Last Post: 11-08-2010, 08:08 AM
  5. Multiple entries
    By Ziggy-R in forum Access
    Replies: 11
    Last Post: 10-03-2010, 07:42 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