Dear Where is the attach file



________________________________
From: P S <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, November 24, 2008 6:25:08 PM
Subject: [Access VBA Central] DateDiff


Hello all. I am trying to code a database that calculates the time difference 
of TIMEIN and TIMEOUT. 

I am attaching a small database. There are 4 fields: ID#, TIMEIN, TIMEOUT, 
TOTALTIME. On the Form, there are 3 buttoms: Create TIMEIN, Create TIMEOUT, and 
Calculate TOTALTIME.

My VB code is as follows:
Private Sub Command8_Click( )
timein = Time()
End Sub

Private Sub Command9_Click( )
timeout = Time()
End Sub

Private Sub Command10_Click( )
Dim totaltime As Integer
totaltime = DateDiff("s" , date1, date2)
End Sub

I'm trying to calculate time difference in seconds and minutes but I can't get 
anything to appear in the TOTALTIME box. In the Table, Timein and Timeout are 
in DATE format. Totaltime is in NUMBER format. Any suggestions? 

Thanks,
Pablo

[Non-text portions of this message have been removed]

 


      

[Non-text portions of this message have been removed]

Reply via email to