Update a control in the main form with the Sum of the values from Subform

L

Ladi

Dear friends and Pros

I'm trying to update a control in the main form with the Sum of the values
in the subform containing columns with numbers.
There is already the relationship between main table and child table, also
between the main form and sub.
The following function would update only one control on the first record.
I have Tables:
MainTab
ChildTabName
Forms:
FormName
SubformName
-------------------------------------------------
Form_ControlName= DSum("[ChildTabName]![ColName]", "ChildTabName",
"[MainID]=[ChildTabName]![MainTabID] And [ChildTabName]![ChildTabID]=
[SubformName].Form![ChildTabID] ")

Thanks in advance,
Ladi
 

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