Running Sum's In Forms

T

Tiffany

I have created a running sum in a form by using the
following DSum Expression:

=DSum("[Service Hours]","[qryServiceInfo]","[EEID]=Forms!
[frmEmplInfo]![frmServiceInfo]![EEID] And [Year]<=Forms!
[frmEmplInfo]![frmServiceInfo]![Year]")

Now I have a text box with an expression in it and I want
to create a running sum of it's results.

But my record source is the form, since I am trying to
total the text box. I get #Error in text box. Any
suggestions on how to get this to work?
 
K

Kelvin

Domain functions like DSum, DCount, and even regular functions like Sum and
Count only work on fields, either from a table or a query. There is no way
to perfomr these functions on a value in a textbox on a form. If you want
to sum the contents of a textbox, you will have to sum the actual
expressions. If your expression is [Field1]*[Field2]*[Field3] and you want
a sum, you will have to use sum([Field1]*[Field2]*[Field3]).

Kelvin
 

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

Top