If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Time Stamp on Form Fields
I have a form which I have developed for a customer relations db. I would
like to have a field on the form which,when a record is opened or a new one began, would display the time automatically. A second field would display the time when the record was ended. I want to do this automatically to avoid any data corruption or modification by non administrators. -- JOE |
#2
|
|||
|
|||
Time Stamp on Form Fields
Hi Joe
You need to give more information about your application to get an answer. The new reocrd "stuff" is simple (if you have somewhere to store the date/time) If Me.NewRecord Then Set the value of some field to Now() Else Do something else End If You need to give more information about this when a record is opened or a new one began, would display the time automatically Do want to store the date/time when the record is altered (overwritting this dat each time) - or something else? and this (how do you know when it's done ?) second field would display the time when the record was ended. So post back with more info and someone will be answer to offer some advice -- Wayne Manchester, England. "JOE POLLOCK" wrote: I have a form which I have developed for a customer relations db. I would like to have a field on the form which,when a record is opened or a new one began, would display the time automatically. A second field would display the time when the record was ended. I want to do this automatically to avoid any data corruption or modification by non administrators. -- JOE |
#3
|
|||
|
|||
Time Stamp on Form Fields
I have been able to arrive at a solution for the time a record was begun.
What I need to know how to do is create the code or an expression to stamp the record as to when that was ended. -- JOE "Wayne-I-M" wrote: Hi Joe You need to give more information about your application to get an answer. The new reocrd "stuff" is simple (if you have somewhere to store the date/time) If Me.NewRecord Then Set the value of some field to Now() Else Do something else End If You need to give more information about this when a record is opened or a new one began, would display the time automatically Do want to store the date/time when the record is altered (overwritting this dat each time) - or something else? and this (how do you know when it's done ?) second field would display the time when the record was ended. So post back with more info and someone will be answer to offer some advice -- Wayne Manchester, England. "JOE POLLOCK" wrote: I have a form which I have developed for a customer relations db. I would like to have a field on the form which,when a record is opened or a new one began, would display the time automatically. A second field would display the time when the record was ended. I want to do this automatically to avoid any data corruption or modification by non administrators. -- JOE |
#4
|
|||
|
|||
Time Stamp on Form Fields
What do you mean by ended? How do you define that a record has ended?
-- Wayne Manchester, England. "JOE POLLOCK" wrote: I have been able to arrive at a solution for the time a record was begun. What I need to know how to do is create the code or an expression to stamp the record as to when that was ended. -- JOE "Wayne-I-M" wrote: Hi Joe You need to give more information about your application to get an answer. The new reocrd "stuff" is simple (if you have somewhere to store the date/time) If Me.NewRecord Then Set the value of some field to Now() Else Do something else End If You need to give more information about this when a record is opened or a new one began, would display the time automatically Do want to store the date/time when the record is altered (overwritting this dat each time) - or something else? and this (how do you know when it's done ?) second field would display the time when the record was ended. So post back with more info and someone will be answer to offer some advice -- Wayne Manchester, England. "JOE POLLOCK" wrote: I have a form which I have developed for a customer relations db. I would like to have a field on the form which,when a record is opened or a new one began, would display the time automatically. A second field would display the time when the record was ended. I want to do this automatically to avoid any data corruption or modification by non administrators. -- JOE |
#5
|
|||
|
|||
Time Stamp on Form Fields
For example, if I receive a call from a client. I open this contact form and
begin typing their contact info and reason for call. Once I have finished the call I want to have a field that will time stamp when I have finished that call. The purpose is to record when the call began and ended to audit time spent. -- JOE "Wayne-I-M" wrote: What do you mean by ended? How do you define that a record has ended? -- Wayne Manchester, England. "JOE POLLOCK" wrote: I have been able to arrive at a solution for the time a record was begun. What I need to know how to do is create the code or an expression to stamp the record as to when that was ended. -- JOE "Wayne-I-M" wrote: Hi Joe You need to give more information about your application to get an answer. The new reocrd "stuff" is simple (if you have somewhere to store the date/time) If Me.NewRecord Then Set the value of some field to Now() Else Do something else End If You need to give more information about this when a record is opened or a new one began, would display the time automatically Do want to store the date/time when the record is altered (overwritting this dat each time) - or something else? and this (how do you know when it's done ?) second field would display the time when the record was ended. So post back with more info and someone will be answer to offer some advice -- Wayne Manchester, England. "JOE POLLOCK" wrote: I have a form which I have developed for a customer relations db. I would like to have a field on the form which,when a record is opened or a new one began, would display the time automatically. A second field would display the time when the record was ended. I want to do this automatically to avoid any data corruption or modification by non administrators. -- JOE |
#6
|
|||
|
|||
Time Stamp on Form Fields
On Thu, 2 Jul 2009 13:26:02 -0700, JOE POLLOCK
wrote: For example, if I receive a call from a client. I open this contact form and begin typing their contact info and reason for call. Once I have finished the call I want to have a field that will time stamp when I have finished that call. The purpose is to record when the call began and ended to audit time spent. The problem there is that there is nothing to prevent you from entering data into all of the controls on a form, and just *leaving the form open* - for ten seconds, for five minutes, for the weekend. You can certainly use the Form's BeforeUpdate event to timestamp the moment when a record is committed to disk (by moving to a new record, by typing shift-enter, by closing the form, etc.): Private Sub Form_BeforeUpdate(Cancel as Integer) do any record validation first Me!txtTimeUpdated = Now End Sub but there's no easy way to compel the user to in fact save the record. -- John W. Vinson [MVP] |
#7
|
|||
|
|||
Time Stamp on Form Fields
OK
You need another table - to store the times tblCallTimes CallID = autonumber ClientID = number CallStart = Time/date (full) CallEnd = Time/date (full) plus any other stuff diectly linked to "this" call. eg. all taken by, dept, notes, etc Link this table with your client table (or who ever you are taking the call from) Set the value of the these fields when the form is opened and closed -- Wayne Manchester, England. "JOE POLLOCK" wrote: For example, if I receive a call from a client. I open this contact form and begin typing their contact info and reason for call. Once I have finished the call I want to have a field that will time stamp when I have finished that call. The purpose is to record when the call began and ended to audit time spent. -- JOE "Wayne-I-M" wrote: What do you mean by ended? How do you define that a record has ended? -- Wayne Manchester, England. "JOE POLLOCK" wrote: I have been able to arrive at a solution for the time a record was begun. What I need to know how to do is create the code or an expression to stamp the record as to when that was ended. -- JOE "Wayne-I-M" wrote: Hi Joe You need to give more information about your application to get an answer. The new reocrd "stuff" is simple (if you have somewhere to store the date/time) If Me.NewRecord Then Set the value of some field to Now() Else Do something else End If You need to give more information about this when a record is opened or a new one began, would display the time automatically Do want to store the date/time when the record is altered (overwritting this dat each time) - or something else? and this (how do you know when it's done ?) second field would display the time when the record was ended. So post back with more info and someone will be answer to offer some advice -- Wayne Manchester, England. "JOE POLLOCK" wrote: I have a form which I have developed for a customer relations db. I would like to have a field on the form which,when a record is opened or a new one began, would display the time automatically. A second field would display the time when the record was ended. I want to do this automatically to avoid any data corruption or modification by non administrators. -- JOE |
#8
|
|||
|
|||
Time Stamp on Form Fields
"JOE POLLOCK" wrote:
I have a form which I have developed for a customer relations db. I would like to have a field on the form which,when a record is opened or a new one began, would display the time automatically. A second field would display the time when the record was ended. I want to do this automatically to avoid any data corruption or modification by non administrators. -- JOE Not sure if this is what your looking for but check out Al's web page on Record Statistics. Date of creation, Date of last edit. http://home.comcast.net/~cccsolutions/accesstips.html HTH Richard |
Thread Tools | |
Display Modes | |
|
|