Capturing start and end time of a form

G

Guest

Hello,

I am working on an Unbound 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.

This Inquiry form adds the data to my Inquiry table (Via a submit command),
the inquiry table has a field "EndProcess" which has as default value
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?

I appreciate your help in advance.

BTW, I also added a StartProcess field in the table Inquiry where I would
like to store the time a operator starts inputting a new record.
 
G

Guest

You need another field let's say "StartProcess". In the form's OnOpen or
OnLoad event, enter the code:
StartProcess = Now()

If you just want to log the time from when the user starts to enter
information, you could put the above code in the OnDirty event of the form
instead.

You can set this field's Visible property to 'No' so the user cannot see
it...I guess you are doing that with the "EndProcess" field.

Steve
 
G

Guest

Steve,

thanks for your reply, I tried adding a new field (StartProcess) on the form
and on the on Dirty event I added the code :
StartProcess = Now()
But nothing shows up there, I will hide that textbox ,but for now I wanted
to see what it would display and as I said nothing shows up in it.

Also, I modified the Append query that is executed on Submit to insert the
time to the StartProcess field of the table but nothing gets inserted there.

The EndProcess time is easier to capture, I added and EndProcess field in
the table which's default value is Now( ), so every time a record is
submitted it captures sthat specific time. I cannot set the "Start process"
table field default property to Now ( ) because then both time would be the
same.

What could be wrong?
 
G

Guest

The Dirty event does not fire for unbound forms. Why use an unbound form?
It is only more work for you and, as you have experienced, there are some
things that don't happen with ubbound forms.
If you must use an unbound form, you will have to find some place to insert
your own code to load the StartProcess value. Not knowing your form, I
couldn't even guess.
The bound form would be ideal for this. As soon as you type the first
keystroke in a new record in a bound form, it becomes dirty and the dirty
event will fire. It doesn't matter which control you are in. With an
unbound control, You can't be sure where the user will start unless you
disable all the controls except 1 and force the user to start with that
control and then enable the other controls when the user enters something in
the one field. Seems like a lot of work.

If you have some reason to think you can't use a bound control, please share
it with us. We may know a way around your problem.
 
G

Guest

Thanks for your thoughts, well Im new using access and I started using a
bound form that was linked to an Inquiries table and I realized that every
time somedy would start typing in one control without finishing inputing the
data in the rest of the other controls it automatically created a new record
so I would have many incomplete records, so then I changed the form to be
Unbounded and commit any changes only on "Submit" (command button that
executes an append query )
What woould your suggestions be for this situation?

Another reason I decided to make the form unbound is that the form is
divided in 3 regions:

1)the top part retrieves information from a Customers table by selecting
the customer id, then other controls get populated with the rest of the
customer information.

2)The middle area in for inputing information about complaints that come
from a particular customer, so this is the information that gets added on the
Inquiries table.

3)The bottom part, has a listbox of inquiries, by double clicking an inquiry
all the above controls from the top and middle area get populated and the
user can update the information.

Basically, these were the specifications that were given to my manager and
passed on to me, so I had no much choice in deciding the design and
functionallities.

I would like to get your feedback, I honestly don't know if a form with
those specifications can be made bound, if there is I would like to learn,
because you are right it's been a lot of work to deal with the Unbound form..

Another question, in what cases is good to use an unbound form?


Thanks in advance
 
G

Guest

Everything you want to do can be done with a bound form. The bound form
creating a new record when a user starts entering in a control is probably
caused by the way the form is set up. This is something that can be
controled.
The three sections you mention can be handled with sub forms. This is a
common requirement in a database application. Being able to populate
controls as you described is also possible. All these things are not only
possible with bound forms, they are, in fact, less work.
The problem is you need more experience in Access. You have been assigned a
fairly advanced task. If you are under time contstaints to get this done,
then perhaps continuing with the unbound approach is the thing to do. I
would suggest, however, that you do some study and practice and don't be shy
about asking questions in these groups, to learn more about Access.
 
G

Guest

Dave,

I appreciate your comments, with help of another fellow of this forum I got
my unbound form to work, but in the future when I am done with this project I
will try to create the Bound version of the form, I will be posting for help
 

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