Timestamp

K

KYJVKG

HI
I have created a form to create an order.
I have already created a timestamp to show the time the order was first
created. Now I also want something to timestamp the form once the data entry
has been completed by having the person click or check something. (I want to
show the time it takes to do one order). I would like to use a button, radio
dial or check box if possible.

I want to make this as simple. I have tried this several times and could
never get the current date.

Please help!
 
M

missinglinq via AccessMonster.com

What types of controls have to be "completed" before the order is compete?
Just text boxes, or text boxes and check boxes or what? The problem with
having a command button or check box is that the user can timestamp the order
as completed even if it isn't. If I'm understanding you correctly, you need
some way to check all your data and only enter the order complete timestamp
if, in fact, the order is complete.
 
K

KYJVKG

Well I am looking to have the user manually mark the order complete. By
marking the order complete, I would like it to be timestamped at that time.

I have created check boxes and buttons to timestamp the coordinating table
but the data comes out with a bogus date.
 
M

ManningFan

In the AfterUpdate event of a checkbox, put something like,

SQL = "UPDATE tblMyTable SET tblMyTable.TimeStamp = " & Now() & " & _
" WHERE (((tblMyTable.RecordID)= " & me.txtRecID & "))"

docmd.runsql "SQL"

Then put a hidden field on your form that holds the ID# for the record.
If you don't have an autonumber field holding a unique record number,
you need to add one to your table. It's always a good idea to have one
so it makes it easy to identify any record uniquely.
 
D

Douglas J. Steele

You've got mismatched quotes, plus dates must be delimited with #
characters:

SQL = "UPDATE tblMyTable SET tblMyTable.TimeStamp = " & _
Format(Now(), "\#mm\/dd\/yyyy hh\:nn\:ss\#") & _
" WHERE (((tblMyTable.RecordID)= " & me.txtRecID & "))"
 
M

missinglinq via AccessMonster.com

What code have you put behind the button that gives you a "bogus" date, and
what do you mean by "bogus?"
 
D

Dirk Goldgar

KYJVKG said:
Well I am looking to have the user manually mark the order complete.
By marking the order complete, I would like it to be timestamped at
that time.

I have created check boxes and buttons to timestamp the coordinating
table but the data comes out with a bogus date.

What do you mean by "bogus"? If you're getting a date of December 30,
1899, you're probably setting the field to the return value of the
Time() function, when instead you should be using the Now() function.
If that's not your problem, you'd better post the code you're using that
is generating this "bogus date".
 
K

KYJVKG via AccessMonster.com

I actually was using the now() function.
and that is the date that it is pulling up.
 
D

Dirk Goldgar

KYJVKG via AccessMonster.com said:
I actually was using the now() function.
and that is the date that it is pulling up.

What date? You still haven't said, as far as I can see.
 

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