Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Barnsley, Yorkshire, England
    Posts
    108
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Totalling Listbox Values (Access2K/Win2K)

    Not sure if this is possible...

    Listbox on a form.. Two columns.. OrderdID and ShippingCost

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,430
    Thanks
    1
    Thanked 33 Times in 33 Posts

    Re: Totalling Listbox Values (Access2K/Win2K)

    You could, I suppose, cycle thru the rows of the listbox and add-up the values for that one column. But it would probably be easier to just use the DSum function as the controlsource for the textbox, using the same criteria you used for the listbox.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Barnsley, Yorkshire, England
    Posts
    108
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Totalling Listbox Values (Access2K/Win2K)

    DSUM did the job perfectly...

    I'm trying to do a count of the rows in the same listbox.. I'm tring to use DCOUNT but i think i am not referencing the listbox correctly??

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Totalling Listbox Values (Access2K/Win2K)

    Counting the number of rows is simpler: set the control source of a text box to

    =[NameOfListBox].[list]

    substituting the actual name of the list box.

Posting Permissions

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