Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MS Access (http://www.go4expert.com/forums/ms-access-forum/)
-   -   compare dates in forms (http://www.go4expert.com/forums/compare-dates-forms-t7890/)

Gostap 17Dec2007 18:03

compare dates in forms
 
Hi there

A question from a newbie, hope some one could help me.

I have a table with some date fields in among others.
One field is called “Start production” and another is called “Stop production”
I want to do a comparison between “Stop production” and “Start production” at the NEXT Next record! It is meant to get an msgBox with a warning if time between “Stop production” and “Start production” at next record exceed e.g. 5 minutes

recID Start production Stop production

1011 2007-10-01 15:33 2007-10-01 16:11
1012 2007-10-01 16:12 2007-10-01 18:32
1013 2007-10-01 18:41 2007-10-01 19:13
1014 2007-10-01 19:14 2007-10-01 21:36

I hope it is not too messy!

Best Regards

Gostap

caveatashish 29Dec2007 16:03

Re: compare dates in forms
 
Hi

you can use datediff function of the access while reteriving the record and check for the dirrerence


All times are GMT +5.5. The time now is 04:25.