By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,395 Members | 1,412 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,395 IT Pros & Developers. It's quick & easy.

form usage time

P: 13
Hi All,

I have a problem about my form. My aim is to get total time spent on, before saving the record to the database on a form. I used the time function when the form loads and save it to the field "dinleme_basla". I want the duration time on the form until the user clicks "save record" button. And save that record to the field called "dinleme_bitis".

Can anyone help me?
Nov 27 '06 #1
Share this Question
Share on Google+
6 Replies


P: 11
Try this to display the time spent (note you'll need to change the format of the fields to short time):

Private Sub Form_Load()
[dinleme_basla].SetFocus
[dinleme_basla].Text = Now()
End Sub

Private Sub SaveRecord_Click()
TimeSpent = Now() - [dinleme_basla]
DoCmd.Close
End Sub

Cheers,
Cz
Nov 27 '06 #2

P: 13
Try this to display the time spent (note you'll need to change the format of the fields to short time):

Private Sub Form_Load()
[dinleme_basla].SetFocus
[dinleme_basla].Text = Now()
End Sub

Private Sub SaveRecord_Click()
TimeSpent = Now() - [dinleme_basla]
DoCmd.Close
End Sub

Cheers,
Cz
it didn't worked
i must use long time as well
Nov 27 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Try this ...

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_Current() 
  3.    Me.[dinleme_basla] = Now()
  4. End Sub
  5.  
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub SaveRecord_Click()
  3.    TimeSpent = Format(Now() - [dinleme_basla],"Long Time")
  4.    DoCmd.Close
  5. End Sub
  6.  
Nov 27 '06 #4

PEB
Expert 100+
P: 1,418
PEB
Try this ...

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_Current() 
  3.    Me.[dinleme_basla] = Now()
  4. End Sub
  5.  
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub SaveRecord_Click()
  3.    TimeSpent = Format(Now() - [dinleme_basla],"Long Time")
  4.    DoCmd.Close
  5. End Sub
  6.  
Mary he double posted!

He has 2 threads running simultannelly!

How can explain that double posting isn't good practice!
Nov 27 '06 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
Mary he double posted!

He has 2 threads running simultannelly!

How can explain that double posting isn't good practice!
barisbasar,

Please note that you have posted your question twice. This will confuse and may even annoy the experts. It also makes it difficult for others searching for the answer to their question in your posts.

Please do not do this. If your post doesn't get answered, which doesn't happen very often, then just post a reply to move it up the list and it will be attended to.

Mary
Nov 27 '06 #6

NeoPa
Expert Mod 15k+
P: 31,661
The other thread is (users usage time on form).
FYI the reasons why it is requested that you do not double post are in (Please do Not Double Post). Although we appreciate that not everyone gets to see all threads, so no censure is implied here.
I will lock this thread now. Further correspondence can be carried out via the other thread.
Nov 27 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.