Suming Data in a Calculeted Control

  • Thread starter Thread starter Mark Avis
  • Start date Start date
M

Mark Avis

Hello,
I have a filtered form that I have a calculated control on. The control
calculates the differences in days of two dates. How do I get a sum of those
caluclations? Thank you.

Mark Avis
 
Add a control to the Form Footer section.

Set its Control Source to =Sum(xxx), where xxx represents the entire
expression in your calculated control (without the =.)

For example, if your calculated control uses:
=[Date2] - [Date1]
you will use:
=Sum([Date2] - [Date1])
 
Hello,
My calculated control uses
DateDiff("d",[DateReturned],[DateCompleted]). When I use
=sum(DateDiff("d",[txtDateReturned],[DateCompleted])) in the footer I get an
error. Thank you.

Mark Avis

Allen Browne said:
Add a control to the Form Footer section.

Set its Control Source to =Sum(xxx), where xxx represents the entire
expression in your calculated control (without the =.)

For example, if your calculated control uses:
=[Date2] - [Date1]
you will use:
=Sum([Date2] - [Date1])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


Mark Avis said:
Hello,
I have a filtered form that I have a calculated control on. The
control
calculates the differences in days of two dates. How do I get a sum of
those
caluclations? Thank you.

Mark Avis

.
 
Form footer, or page footer?

You have a txt prefix in one field name, but not the other? Are both of
these guaranteed to be valid dates (or null), or could the data type be
suspect?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


Mark Avis said:
Hello,
My calculated control uses
DateDiff("d",[DateReturned],[DateCompleted]). When I use
=sum(DateDiff("d",[txtDateReturned],[DateCompleted])) in the footer I get
an
error. Thank you.

Mark Avis

Allen Browne said:
Add a control to the Form Footer section.

Set its Control Source to =Sum(xxx), where xxx represents the entire
expression in your calculated control (without the =.)

For example, if your calculated control uses:
=[Date2] - [Date1]
you will use:
=Sum([Date2] - [Date1])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


Mark Avis said:
Hello,
I have a filtered form that I have a calculated control on. The
control
calculates the differences in days of two dates. How do I get a sum of
those
caluclations? Thank you.

Mark Avis

.
 
Back
Top