DateDiff calculation to update a table field

  • Thread starter Thread starter Dan J
  • Start date Start date
D

Dan J

I am trying to calculate and enter into a table the date difference for a
railcar delivering raw materials in my plant. I would like to enter the
Date In into the form which enters that date into the table, then the Date
Out date is enter into the Date Out box which updates the Date Out field in
the table. Upon exit of the Date Out field I would like an automated update
calculated with the DateDiff function to enter into the Days on Site field
to ensure the rail line in charging for the correct number of days that the
car was actually on site.

Thanks, in advance, for any help!!

Dan
 
Hi Dan.

Unless there could be valid reasons why the charge should NOT be for the
correct number of days, you must not store this value in the table. Instead,
have Access calculate it in a query.

For more information, and examples of how to do it in the table and in the
query, see:
Calculated fields
at:
http://members.iinet.net.au/~allenbrowne/casu-14.html
 
Back
Top