DateDiff calculation to update a table field

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
 
A

Allen Browne

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
 

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

Top