how to get Text box calculation total added to a table field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a form I have a text box with a calculation. I would like this calculation
to end up in a field in my table. How can I accomplish this? Any help is
greatly appreciated!
 
Roby said:
In a form I have a text box with a calculation. I would like this
calculation to end up in a field in my table. How can I accomplish
this? Any help is greatly appreciated!

The proper idea is "if you can calculate it why store it?" Not only is it
unneccessary, but it's actually a bad idea to store values that can be
calculated.

If your next thought is "but I need this value for a report or on other forms",
then simply use the same expression in those cases as you are on your current
form.
 
Thanks for the reply. I tried that. I have a report calculating the same as a
form.

=Format([Start Time]-1-[End Time],"Short Time")

But it is coming up with the "?Name" Is it because it is a report with
multiple records and in each record I need the report to calculate the time
between the start time and the end time. Or if I can just total all the start
times and the minus them from all the end times? Suggestions? I just need one
total of total time in
 
Roby said:
Thanks for the reply. I tried that. I have a report calculating the
same as a form.

=Format([Start Time]-1-[End Time],"Short Time")

But it is coming up with the "?Name" Is it because it is a report with
multiple records and in each record I need the report to calculate
the time between the start time and the end time. Or if I can just
total all the start times and the minus them from all the end times?
Suggestions? I just need one total of total time in

You really can't use DateTime for durations if you will have totals that go over
24 hours. Use DateDiff to get the difference iin minutes, sum that number, and
then convert it back to hours and minutes after summing.
 
OK got that thank you! Do you know now how I can sum time from the text box,
that is now calculating the correct time duration, and put another text box
in a form footer?
 
Back
Top