I want to show a sum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to show the sum of selected data.
After several weeks of frustration, I have got the data into a list box
using;-

Me.List144.RowSource = "SELECT [Masterlist].[EQU] FROM [Masterlist] WHERE
[Masterlist].[Tech] = '" & Combo0.Text & "';"

All I want to do is show the sum of these numbers in a text box.
It sounds easy, obviously it is not.
Can anyone help?
 
Easiest may be to use the DSUM function as the source of the control

= DSum("EQU","MasterList","[Tech] = '" & Combo0.Value & "'")



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Thank you John, this has been driving me crazy all weekend.

The code worked, but my combo box is cleared on update.

I just used the textbox related to this combo box which retains the info
until something else is selected.

The new code is
= DSum("EQU","MasterList","[Tech] = '" & [TxtTechnician].[Value] & "'")

This works fine, thanks again, you have given me back my sanity.


John Spencer said:
Easiest may be to use the DSUM function as the source of the control

= DSum("EQU","MasterList","[Tech] = '" & Combo0.Value & "'")



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Mike said:
I am trying to show the sum of selected data.
After several weeks of frustration, I have got the data into a list box
using;-

Me.List144.RowSource = "SELECT [Masterlist].[EQU] FROM [Masterlist] WHERE
[Masterlist].[Tech] = '" & Combo0.Text & "';"

All I want to do is show the sum of these numbers in a text box.
It sounds easy, obviously it is not.
Can anyone help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top