Sum in Query

Jim W

Registered User.
Local time
Today, 22:59
Joined
Feb 4, 2003
Messages
198
Query Sum help

I have a query that finds records based on certin values on a form. The query returns values like the list below
System Module Hrs
1234 A 1.2
5678 C 3.4

My question is how can I total the Hrs. and have that number stored in a field on the form?

Thanks

Jim
 
I have searched the help files for DSUM() but can not get it to work. How should the code be between the ()

= DSum(Hoursdown)



Jim
 
Syntax:
DSum(expr, domain[, criteria])

expr = An expression that identifies the numeric field

domain = It can be a table name or a query name

=DSum(Hrs ,queryname)
 
Ok so I have a field on a form called totalhrs. In the control source for this field I have this code
=DSum([Hoursdown],[Qry-Totalhrs])

When this form opens this field value go to ?Name

What is the best way to trigger the qry to get the data?

Jim
 
=DSum("[Hoursdown]","[Qry-Totalhrs]")

Hoursdown is a field
Qry-Totalhrs is the name of your query

You need to put them inside quotation marks, as above.
 

Users who are viewing this thread

Back
Top Bottom