Date and Time Functions

S

Sara

Hello

I am working on a form that our phone customer service group will use to
input inquiries. The operator while on the phone with the customer will have
to fill it out.
Now my boss would like to track the time elapsed since the operator starts
inputing the data in th form till the time the inquiry is submitted.
Is there a way to do that?
This Inquiry form adds the data to my Inquiry table, the inquiry table uses
the function "Now()" whichs stores the date and time in one field each time
and inquiry is submitted.

How could I get the time in which the operator starts filling out the form?
Is this possible?

I appreciate your help in advance.
 
F

fredg

Hello

I am working on a form that our phone customer service group will use to
input inquiries. The operator while on the phone with the customer will have
to fill it out.
Now my boss would like to track the time elapsed since the operator starts
inputing the data in th form till the time the inquiry is submitted.
Is there a way to do that?
This Inquiry form adds the data to my Inquiry table, the inquiry table uses
the function "Now()" whichs stores the date and time in one field each time
and inquiry is submitted.

How could I get the time in which the operator starts filling out the form?
Is this possible?

I appreciate your help in advance.

Several ways.

Add a new field to the table "StartProcess" DateTime datatype.
Add this field to the form used for data entry.

1) Is there always one control that the operator starts the process
in? If so ....

Let's assume the operator always starts with the CallerName field.
Code the CallerName AfterUpdate event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

As soon as the CallerName is fully entered the StartProcess time will
also be entered.

2) If there is no one particular field the operator starts at, then
code the [StartProcess] Click event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

Now all the operator has to do is start by just clicking in this
field, then go on to any other field and continue entering data.

You might want to set the form's tab order so that the correct control
will have focus when you navigate to the next/new record.
 
S

Sara

Fred,

Thanks for the reply, but I am still having trouble with it.

Yes there is a particular text box that the operator normally starts at, I
tried your suggestion number 1, but I couldn't get it to work, Idon't know
what I am doing wrong.
I suspect it could be because none of the controls in my form are bounded to
my "Inquiry tables", instead I have a submit buton that only when is clicked
commits the new inquiry to the table.

Would your code still work under this circumstance?

I appreciate your help.
fredg said:
Hello

I am working on a form that our phone customer service group will use to
input inquiries. The operator while on the phone with the customer will have
to fill it out.
Now my boss would like to track the time elapsed since the operator starts
inputing the data in th form till the time the inquiry is submitted.
Is there a way to do that?
This Inquiry form adds the data to my Inquiry table, the inquiry table uses
the function "Now()" whichs stores the date and time in one field each time
and inquiry is submitted.

How could I get the time in which the operator starts filling out the form?
Is this possible?

I appreciate your help in advance.

Several ways.

Add a new field to the table "StartProcess" DateTime datatype.
Add this field to the form used for data entry.

1) Is there always one control that the operator starts the process
in? If so ....

Let's assume the operator always starts with the CallerName field.
Code the CallerName AfterUpdate event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

As soon as the CallerName is fully entered the StartProcess time will
also be entered.

2) If there is no one particular field the operator starts at, then
code the [StartProcess] Click event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

Now all the operator has to do is start by just clicking in this
field, then go on to any other field and continue entering data.

You might want to set the form's tab order so that the correct control
will have focus when you navigate to the next/new record.
 
F

fredg

Fred,

Thanks for the reply, but I am still having trouble with it.

Yes there is a particular text box that the operator normally starts at, I
tried your suggestion number 1, but I couldn't get it to work, Idon't know
what I am doing wrong.
I suspect it could be because none of the controls in my form are bounded to
my "Inquiry tables", instead I have a submit buton that only when is clicked
commits the new inquiry to the table.

Would your code still work under this circumstance?

I appreciate your help.
fredg said:
Hello

I am working on a form that our phone customer service group will use to
input inquiries. The operator while on the phone with the customer will have
to fill it out.
Now my boss would like to track the time elapsed since the operator starts
inputing the data in th form till the time the inquiry is submitted.
Is there a way to do that?
This Inquiry form adds the data to my Inquiry table, the inquiry table uses
the function "Now()" whichs stores the date and time in one field each time
and inquiry is submitted.

How could I get the time in which the operator starts filling out the form?
Is this possible?

I appreciate your help in advance.

Several ways.

Add a new field to the table "StartProcess" DateTime datatype.
Add this field to the form used for data entry.

1) Is there always one control that the operator starts the process
in? If so ....

Let's assume the operator always starts with the CallerName field.
Code the CallerName AfterUpdate event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

As soon as the CallerName is fully entered the StartProcess time will
also be entered.

2) If there is no one particular field the operator starts at, then
code the [StartProcess] Click event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

Now all the operator has to do is start by just clicking in this
field, then go on to any other field and continue entering data.

You might want to set the form's tab order so that the correct control
will have focus when you navigate to the next/new record.

If the form is not bound to a table, then there is no NewRecord.

Change the code:

Code that first control's Click event:

Me.StartProcess = Now()

Code whatever button you use to save the data, (or however you are
currently entering the end of entry time):

Me.EndProcess = Now()

Then you can compute the time difference using
Me.[EleapsedTime] = DateDiff("s",[StartTime],[EndTime])

But you are still going to have to save the StartProcess data in a
table, otherwise that data disappears the next time you enter a
different record..
 
S

Sara

Fred,

I added the code you gave me to On_Click of the text box in my form (That
textbox is the first control the operator uses to input the customer name)
and I added a StartProcess field in the table Inquiries, however I am afraid
I still need directions on how to save that starttime to the table, my query
to add the information from the form to the table adds the name of the
customer to my table but How do I add the time to the table?

For the EndProcess Time, since I have a submit buton in my form which on
click executes an INSERT query to the table, Also the EndProcess field in my
table inquiries is set to default Now(), in this way every time the operator
clicks the bumit buton the end time automatically populates in my table.

I really apreciate your responses, I think I'm almost there I just need a
little more clarification I am pretty new using access.







fredg said:
Fred,

Thanks for the reply, but I am still having trouble with it.

Yes there is a particular text box that the operator normally starts at, I
tried your suggestion number 1, but I couldn't get it to work, Idon't know
what I am doing wrong.
I suspect it could be because none of the controls in my form are bounded to
my "Inquiry tables", instead I have a submit buton that only when is clicked
commits the new inquiry to the table.

Would your code still work under this circumstance?

I appreciate your help.
fredg said:
On Thu, 7 Jun 2007 08:34:01 -0700, Sara wrote:

Hello

I am working on a form that our phone customer service group will use to
input inquiries. The operator while on the phone with the customer will have
to fill it out.
Now my boss would like to track the time elapsed since the operator starts
inputing the data in th form till the time the inquiry is submitted.
Is there a way to do that?
This Inquiry form adds the data to my Inquiry table, the inquiry table uses
the function "Now()" whichs stores the date and time in one field each time
and inquiry is submitted.

How could I get the time in which the operator starts filling out the form?
Is this possible?

I appreciate your help in advance.

Several ways.

Add a new field to the table "StartProcess" DateTime datatype.
Add this field to the form used for data entry.

1) Is there always one control that the operator starts the process
in? If so ....

Let's assume the operator always starts with the CallerName field.
Code the CallerName AfterUpdate event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

As soon as the CallerName is fully entered the StartProcess time will
also be entered.

2) If there is no one particular field the operator starts at, then
code the [StartProcess] Click event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

Now all the operator has to do is start by just clicking in this
field, then go on to any other field and continue entering data.

You might want to set the form's tab order so that the correct control
will have focus when you navigate to the next/new record.

If the form is not bound to a table, then there is no NewRecord.

Change the code:

Code that first control's Click event:

Me.StartProcess = Now()

Code whatever button you use to save the data, (or however you are
currently entering the end of entry time):

Me.EndProcess = Now()

Then you can compute the time difference using
Me.[EleapsedTime] = DateDiff("s",[StartTime],[EndTime])

But you are still going to have to save the StartProcess data in a
table, otherwise that data disappears the next time you enter a
different record..
 
F

fredg

Fred,

I added the code you gave me to On_Click of the text box in my form (That
textbox is the first control the operator uses to input the customer name)
and I added a StartProcess field in the table Inquiries, however I am afraid
I still need directions on how to save that starttime to the table, my query
to add the information from the form to the table adds the name of the
customer to my table but How do I add the time to the table?

For the EndProcess Time, since I have a submit buton in my form which on
click executes an INSERT query to the table, Also the EndProcess field in my
table inquiries is set to default Now(), in this way every time the operator
clicks the bumit buton the end time automatically populates in my table.

I really apreciate your responses, I think I'm almost there I just need a
little more clarification I am pretty new using access.



fredg said:
Fred,

Thanks for the reply, but I am still having trouble with it.

Yes there is a particular text box that the operator normally starts at, I
tried your suggestion number 1, but I couldn't get it to work, Idon't know
what I am doing wrong.
I suspect it could be because none of the controls in my form are bounded to
my "Inquiry tables", instead I have a submit buton that only when is clicked
commits the new inquiry to the table.

Would your code still work under this circumstance?

I appreciate your help.
:

On Thu, 7 Jun 2007 08:34:01 -0700, Sara wrote:

Hello

I am working on a form that our phone customer service group will use to
input inquiries. The operator while on the phone with the customer will have
to fill it out.
Now my boss would like to track the time elapsed since the operator starts
inputing the data in th form till the time the inquiry is submitted.
Is there a way to do that?
This Inquiry form adds the data to my Inquiry table, the inquiry table uses
the function "Now()" whichs stores the date and time in one field each time
and inquiry is submitted.

How could I get the time in which the operator starts filling out the form?
Is this possible?

I appreciate your help in advance.

Several ways.

Add a new field to the table "StartProcess" DateTime datatype.
Add this field to the form used for data entry.

1) Is there always one control that the operator starts the process
in? If so ....

Let's assume the operator always starts with the CallerName field.
Code the CallerName AfterUpdate event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

As soon as the CallerName is fully entered the StartProcess time will
also be entered.

2) If there is no one particular field the operator starts at, then
code the [StartProcess] Click event:

If Me.NewRecord = True then
Me![StartProcess] = Now()
End If

Now all the operator has to do is start by just clicking in this
field, then go on to any other field and continue entering data.

You might want to set the form's tab order so that the correct control
will have focus when you navigate to the next/new record.

If the form is not bound to a table, then there is no NewRecord.

Change the code:

Code that first control's Click event:

Me.StartProcess = Now()

Code whatever button you use to save the data, (or however you are
currently entering the end of entry time):

Me.EndProcess = Now()

Then you can compute the time difference using
Me.[EleapsedTime] = DateDiff("s",[StartTime],[EndTime])

But you are still going to have to save the StartProcess data in a
table, otherwise that data disappears the next time you enter a
different record..

There are several ways.
Using your current method of an unbound form:
1) Add the StartProcess field to the query that appends the new data
to the table
or
2) Add the StartProcess field to the code in the Command button that
saves the EndProcess time.

New method:
3) Easiest is to change your entire method and bind the form to the
table and bind each control to it's field in the table, in which case
each field in the table is updated as you enter the data, and you
don't need the submit command button at all. You would then set the
EndProcess Default value property to =Now() and the time will be added
to the table when you save the record (i.e. go to the next record).
 
S

Sara

Fred,

I strugled for quite a while with this and I can't get it to work.
As you suggested, to calculate the elapsed time between when a user starts
using a form till the moment it is submited, I added 2 to my table
startprocess and endprocess, I coded the on_click event of the first control
the user starts using like this:

Me.StartProcess = Now()

but I keep getting the error: " Compile error: Method or Data member not
found"


Any idea on what could be wrong?
I would really apreciate hints



If the form is not bound to a table, then there is no NewRecord.

Change the code:

Code that first control's Click event:

Me.StartProcess = Now()

Code whatever button you use to save the data, (or however you are
currently entering the end of entry time):

Me.EndProcess = Now()

Then you can compute the time difference using
Me.[EleapsedTime] = DateDiff("s",[StartTime],[EndTime])

But you are still going to have to save the StartProcess data in a
table, otherwise that data disappears the next time you enter a
different record..

There are several ways.
Using your current method of an unbound form:
1) Add the StartProcess field to the query that appends the new data
to the table
or
2) Add the StartProcess field to the code in the Command button that
saves the EndProcess time.

New method:
3) Easiest is to change your entire method and bind the form to the
table and bind each control to it's field in the table, in which case
each field in the table is updated as you enter the data, and you
don't need the submit command button at all. You would then set the
EndProcess Default value property to =Now() and the time will be added
to the table when you save the record (i.e. go to the next record).
 
F

fredg

Fred,

I strugled for quite a while with this and I can't get it to work.
As you suggested, to calculate the elapsed time between when a user starts
using a form till the moment it is submited, I added 2 to my table
startprocess and endprocess, I coded the on_click event of the first control
the user starts using like this:

Me.StartProcess = Now()

but I keep getting the error: " Compile error: Method or Data member not
found"

Any idea on what could be wrong?
I would really apreciate hints
If the form is not bound to a table, then there is no NewRecord.

Change the code:

Code that first control's Click event:

Me.StartProcess = Now()

Code whatever button you use to save the data, (or however you are
currently entering the end of entry time):

Me.EndProcess = Now()

Then you can compute the time difference using
Me.[EleapsedTime] = DateDiff("s",[StartTime],[EndTime])

But you are still going to have to save the StartProcess data in a
table, otherwise that data disappears the next time you enter a
different record..

There are several ways.
Using your current method of an unbound form:
1) Add the StartProcess field to the query that appends the new data
to the table
or
2) Add the StartProcess field to the code in the Command button that
saves the EndProcess time.

New method:
3) Easiest is to change your entire method and bind the form to the
table and bind each control to it's field in the table, in which case
each field in the table is updated as you enter the data, and you
don't need the submit command button at all. You would then set the
EndProcess Default value property to =Now() and the time will be added
to the table when you save the record (i.e. go to the next record).

Sara,
You must have something going on there that I can't see.
All I can do for you is offer to take a look at your database to see
what it is.
If you wish to send it to me

jandf at roadrunner dot com

I will see what I can do for you.
Make sure the Subject line of the email reads "Database from Sara",
otherwise I will not get it.

All I need is the form and whatever table(s)/query (with just enough
sample data) to run the form. If you are calling a module code from
the form, I'll need that too.
Try it before you send it to make sure it runs (other than the problem
you are having).
 
S

Sara

Fred,

I sent you a copy of my database, if you have any further questions let me
know.

fredg said:
Fred,

I strugled for quite a while with this and I can't get it to work.
As you suggested, to calculate the elapsed time between when a user starts
using a form till the moment it is submited, I added 2 to my table
startprocess and endprocess, I coded the on_click event of the first control
the user starts using like this:

Me.StartProcess = Now()

but I keep getting the error: " Compile error: Method or Data member not
found"

Any idea on what could be wrong?
I would really apreciate hints
If the form is not bound to a table, then there is no NewRecord.

Change the code:

Code that first control's Click event:

Me.StartProcess = Now()

Code whatever button you use to save the data, (or however you are
currently entering the end of entry time):

Me.EndProcess = Now()

Then you can compute the time difference using
Me.[EleapsedTime] = DateDiff("s",[StartTime],[EndTime])

But you are still going to have to save the StartProcess data in a
table, otherwise that data disappears the next time you enter a
different record..
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


There are several ways.
Using your current method of an unbound form:
1) Add the StartProcess field to the query that appends the new data
to the table
or
2) Add the StartProcess field to the code in the Command button that
saves the EndProcess time.

New method:
3) Easiest is to change your entire method and bind the form to the
table and bind each control to it's field in the table, in which case
each field in the table is updated as you enter the data, and you
don't need the submit command button at all. You would then set the
EndProcess Default value property to =Now() and the time will be added
to the table when you save the record (i.e. go to the next record).

Sara,
You must have something going on there that I can't see.
All I can do for you is offer to take a look at your database to see
what it is.
If you wish to send it to me

jandf at roadrunner dot com

I will see what I can do for you.
Make sure the Subject line of the email reads "Database from Sara",
otherwise I will not get it.

All I need is the form and whatever table(s)/query (with just enough
sample data) to run the form. If you are calling a module code from
the form, I'll need that too.
Try it before you send it to make sure it runs (other than the problem
you are having).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top