I have a Access database that holds data for downtime. One field holds the StartTime for the Dowtime, and another field holds the EndTime for the Downtime.
What I'm trying to do is when the txtEndTime box receives the LostFocus() event, I want it to automatically populate the Downtime text box. Therefore, it would grab the second time and subtract it from the first time, and then leaving a total "Downtime" for the Downtime TextBox.
What would be the best way to do this? I had received another way to do it through another forum about a week ago, but I couldnt get it to work. The way that the programmer used it was with the DateDiff() function. But it didnt work if it was for the same day. Example: StartTime: 12:42, EndTime: 15:37. It would not calculate the difference at all.
Does any one have any suggesstions?
Thanx,
Ps, the date format in Access is Medium date.
Donn
What I'm trying to do is when the txtEndTime box receives the LostFocus() event, I want it to automatically populate the Downtime text box. Therefore, it would grab the second time and subtract it from the first time, and then leaving a total "Downtime" for the Downtime TextBox.
What would be the best way to do this? I had received another way to do it through another forum about a week ago, but I couldnt get it to work. The way that the programmer used it was with the DateDiff() function. But it didnt work if it was for the same day. Example: StartTime: 12:42, EndTime: 15:37. It would not calculate the difference at all.
Does any one have any suggesstions?
Thanx,
Ps, the date format in Access is Medium date.
Donn