Difference of two text boxes into a third text box (1 Viewer)

beckie1234

Struggling Student
Local time
Today, 12:10
Joined
Mar 10, 2007
Messages
94
I have two text boxes that show a begin time and an end time. I want to take the different and put it in another text box that shows the results.

EX:
begin end total
05:12 am - 05:23 am = 11

Any suggestions??
I am looking to make it so whoever does data entry, it will be a little easier because the total will be automatically be entered into a text box.
 

ColinEssex

Old registered user
Local time
Today, 20:10
Joined
Feb 22, 2002
Messages
9,128
Look up DateDiff() in Access help. Obviously the 2 time fields will need to be formatted as Date/Time and not just Text

Col
 

beckie1234

Struggling Student
Local time
Today, 12:10
Joined
Mar 10, 2007
Messages
94
They are formatted as time. I looked through the different examples and it show how for format date/time and minus dates from other dates but I need it to specifically subtract the first time from the second time and display the results in another text box. I understand that is where I would put in the formula just not sure what it is.
 

Michael J Ross

Registered User.
Local time
Today, 20:10
Joined
Mar 2, 2006
Messages
245
Set the control source of the text box to:

=DateDiff("n",[Begin],[End])

this will give the difference in minutes between the two times.
 

Users who are viewing this thread

Top Bottom