Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DSum

0 views
Skip to first unread message

K

unread,
Nov 14, 2007, 9:46:01 AM11/14/07
to

Good day.

I am trying to and populate a field in the main form "TTLCostCND" by
summing a field in a subform"CostFT. I get the error message Argument not
optional. Any help would be appreciated to achieve this goal

Mainform is called "frmQuotes" - Table is called tblQoutes
Subform is called "frmQuotesSubform" - Table is called tblQuotesSubfrm

Private Sub UOM_AfterUpdate()
Me.CostFT = Round(Me.CCRATE * Me.HRSCft / 100, 4)
Me.Form_frmQuotes!TTLCostCND = DSum(Me.CostFT)

End Sub

Thanks in advance.

Klatuu

unread,
Nov 14, 2007, 10:09:01 AM11/14/07
to
What you are calling a field is a control. It only contains one value, so it
can't be summed. The DSum is a domain aggragate function, meaning it is used
with tables or queries to sum a field.
--
Dave Hargis, Microsoft Access MVP

K

unread,
Nov 14, 2007, 10:16:01 AM11/14/07
to
Thanks for your time. Is there a way to complete this task?

Klatuu

unread,
Nov 14, 2007, 10:19:06 AM11/14/07
to
What is it you are trying to Sum?

K

unread,
Nov 14, 2007, 10:24:39 AM11/14/07
to
I mam trying to sum the control called [CostFT] in a subform called
"FrmQuotesSubform" and then display the Sum of [CostFT] in a control called
TTLCOSTCND on the form that hosts the subform called frmQuotes.

I can sum the control [CostFT] in the subform footer but I want this value
poplulated in the TTLCostCND control

0 new messages