DSum of the DSum

G

Guest

Hello!
I have:
A MainForm based in T_Main
A SubForm based in T_Main too.
In SubForm I have a Textbox with

=DSum("[Area]";"T_Another";"[IdSector] = [txtIdSector]")

in Control Source row, where calc values based in T_Another.
Work fine all.

Now, I would like sum [txtIdSector] based in same T_Another or in obtained
values in this SubForm.
Where is it possible, please.
Tanks in advance.
an
 
W

Wolfgang Kais

Dear "an".

an said:
Hello!
I have:
A MainForm based in T_Main
A SubForm based in T_Main too.
In SubForm I have a Textbox with

=DSum("[Area]";"T_Another";"[IdSector] = [txtIdSector]")

in Control Source row, where calc values based in T_Another.
Work fine all.

Now, I would like sum [txtIdSector] based in same T_Another or in obtained
values in this SubForm.
Where is it possible, please.
Tanks in advance.

What is txtIdSector? A control in the subform?
I'd rather use a textbox in the footer of the subform containing
=Sum([Area])
and the same in the footer of the main form.
Or what about DSum("[Area]";"T_Another")?
Remark: You can not use an aggregate function in the footer of a form that
uses textboxes with caclulated values. Instead, you must use the calculation
expression based on fields contained in the recordsource of the form.
 
G

Guest

WK, thanks for your reply.

Problem solved with
=DSum("[Area]";"T_Another";"[IdSector]")
Work fine.
(txtIdSector is the Name of Textbox of the Area field in SubForm)

Many thanks ore more time.
an

Wolfgang Kais said:
Dear "an".

an said:
Hello!
I have:
A MainForm based in T_Main
A SubForm based in T_Main too.
In SubForm I have a Textbox with

=DSum("[Area]";"T_Another";"[IdSector] = [txtIdSector]")

in Control Source row, where calc values based in T_Another.
Work fine all.

Now, I would like sum [txtIdSector] based in same T_Another or in obtained
values in this SubForm.
Where is it possible, please.
Tanks in advance.

What is txtIdSector? A control in the subform?
I'd rather use a textbox in the footer of the subform containing
=Sum([Area])
and the same in the footer of the main form.
Or what about DSum("[Area]";"T_Another")?
Remark: You can not use an aggregate function in the footer of a form that
uses textboxes with caclulated values. Instead, you must use the calculation
expression based on fields contained in the recordsource of the form.
 

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

Similar Threads


Top