Results 1 to 2 of 2
  1. #1
    mmahmod is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012

    sum the values of list box

    Dear All

    i have a list box based on query for invoice no & invoice amount
    how can i do the following
    1- sum all the values of the list box (sum of invoices amount) in unbound text field
    2- sum the selected invoices amount (if i select two or more invoices from the list) in unbound text field
    3-how can i append the selected invoices from the list to append a table with the same fields by VBA code

    Thanks in advance

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    The Great Land
    Need to cycle through the listbox and do whatever you want with the selected values. Review:

    Within the loop you can build a string or add amount to a variable holding sum or save data to table with sql action (CurrentDb.Execute "INSERT INTO tablename...")
    How to attach file: To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Drop-down list values selection
    By Haleakala17 in forum Forms
    Replies: 2
    Last Post: 09-29-2012, 03:59 PM
  2. Cycling through values in a list box
    By kmw in forum Programming
    Replies: 4
    Last Post: 08-27-2012, 10:58 AM
  3. Replies: 5
    Last Post: 08-16-2012, 11:05 AM
  4. Combo Box - Field List Values
    By jennyaccord in forum Forms
    Replies: 5
    Last Post: 07-29-2011, 01:49 PM
  5. List all values in one cell?
    By Remster in forum Queries
    Replies: 5
    Last Post: 12-17-2010, 04:33 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