Conditional SUM, in Textbox

  • Thread starter Thread starter an
  • Start date Start date
A

an

Hello.
In one table I have IdPassage, IdChunk, and ChunkValue
fields.
The Passage is composed for Chunks. The addition the Sum
of Chunks is the length of the Passage.
In a Form I need to SUM the ChunkValue, only of the same
Passage.
How I can make this, please?

Anticipatedly grateful.
an
 
Hi, an.

I'm assuming that you have a table called Passages, and that it has a
one-to-many relationship with the table you describe. Create a main form
based on Passages, and create a continuous subform based on Chunks, linked by
the IDPassage field.

Then in the subform footer, place a control with the Control Source set to:

=Sum(Nz([ChunkValue]))
 
Thanks, S.

And if I need to COUNT the number of ID's (records) there
are with same Passage, please?

Thanks in advance.
an
-----Original Message-----
Hi, an.

I'm assuming that you have a table called Passages, and that it has a
one-to-many relationship with the table you describe. Create a main form
based on Passages, and create a continuous subform based on Chunks, linked by
the IDPassage field.

Then in the subform footer, place a control with the Control Source set to:

=Sum(Nz([ChunkValue]))



an said:
Hello.
In one table I have IdPassage, IdChunk, and ChunkValue
fields.
The Passage is composed for Chunks. The addition the Sum
of Chunks is the length of the Passage.
In a Form I need to SUM the ChunkValue, only of the same
Passage.
How I can make this, please?

Anticipatedly grateful.
an
.
 
Similarly, in a subform footer control, set the Control Source to

=Count([IDChunk])

HTH
Sprinks

an said:
Thanks, S.

And if I need to COUNT the number of ID's (records) there
are with same Passage, please?

Thanks in advance.
an
-----Original Message-----
Hi, an.

I'm assuming that you have a table called Passages, and that it has a
one-to-many relationship with the table you describe. Create a main form
based on Passages, and create a continuous subform based on Chunks, linked by
the IDPassage field.

Then in the subform footer, place a control with the Control Source set to:

=Sum(Nz([ChunkValue]))



an said:
Hello.
In one table I have IdPassage, IdChunk, and ChunkValue
fields.
The Passage is composed for Chunks. The addition the Sum
of Chunks is the length of the Passage.
In a Form I need to SUM the ChunkValue, only of the same
Passage.
How I can make this, please?

Anticipatedly grateful.
an
.
 
Many thanks, S, for your help.

have you a good weekend.
an
-----Original Message-----
Similarly, in a subform footer control, set the Control Source to

=Count([IDChunk])

HTH
Sprinks

an said:
Thanks, S.

And if I need to COUNT the number of ID's (records) there
are with same Passage, please?

Thanks in advance.
an
-----Original Message-----
Hi, an.

I'm assuming that you have a table called Passages,
and
that it has a
one-to-many relationship with the table you describe. Create a main form
based on Passages, and create a continuous subform
based
on Chunks, linked by
the IDPassage field.

Then in the subform footer, place a control with the Control Source set to:

=Sum(Nz([ChunkValue]))



:

Hello.
In one table I have IdPassage, IdChunk, and ChunkValue
fields.
The Passage is composed for Chunks. The addition the Sum
of Chunks is the length of the Passage.
In a Form I need to SUM the ChunkValue, only of the same
Passage.
How I can make this, please?

Anticipatedly grateful.
an

.
.
 
Back
Top