I working on my billing & collection section of my system and I want to display the sum/total amount of the consumer to a text box, by the way the listbox is depending on a textbox where i can search a name.
please help.
I working on my billing & collection section of my system and I want to display the sum/total amount of the consumer to a text box, by the way the listbox is depending on a textbox where i can search a name.
please help.
Don't know your data structure nor form design so hard to advise specifics. What data is in listbox? Can't sum on listbox items.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
As I said, can't sum items in listbox, unless you want to write VBA code that loops through the listbox items.
Could use a subform instead.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Don't see why you can't do a DSum on the listbox rowsource query.
If there is a query object, yes. But if the query is just SQL statement in the RowSource, no. Can DSum on the table with same filter criteria used for the listbox.
So either build query object if there is not already one, or reference table directly.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I have used the dsum function sir, and it solved my problem, anyway thanks for the idea..![]()