SUM

P

Pietro

Hi,
What's the code that i should put in the controlsource of an unbound
control to do this:

Sum the field Calls of the query CMSdaily where datec is between
[forms]![cms report]![from] and [forms]![cms report]![to]

Regard
 
L

Larry Linson

Check Help on the DSum domain aggregate function. You can't execute a Query
or SQL in the ControlSource. You can specify a Query, or SQL, or a Table in
the RecordSource of a Form, and then use the Fields in the RecordSource as
ControlSource, or use expressions (including the domain aggregate functions
which return a single value).

Larry Linson
Microsoft Office Access MVP
 
Top