Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

checkbox to do a date time stamp

checkbox to do a date time stamp

checkbox to do a date time stamp

I have a database that I inherited that has a check box to be used when a task is completed. THis is also tied in to an agent that sends emails out to remind the responsible party to complete the task if the box is not checked.

I would like to add the functionality to the checkbox to have it write the name of the person who clicked the checkbox and the date/time stamp of when it was clicked.

any suggestions on how I would do this?

RE: checkbox to do a date time stamp

Create two hidden fields on your document (UpdatedBy, UpdateTime?).  In the Exiting function of the checkbox write a script that if the box is checked, update the two hidden fields with the username and current date & time.  
If the document is complete when the box is checked and it won't be changed again, that should take care of it.  If it's a document that will be opened again, you'll need to do some programming to make sure that you only do this function if it wasn't already checked.



There are 10 types of people in the world -
those who understand binary
those who don't!

RE: checkbox to do a date time stamp

This is how I've done it in one of my applications.

Create a checkbox field and call, it for example, "FormComp". Put "Yes" into the field choices and check the "Refresh fields on keyword change" box.

Create a computer text field called "CompUser" and put the following in as the default value:

@If(FormComp="";"";FormComp="Yes"& CompUser="";"Completed by "+@Name([CN];@UserName)+" on "+@Text(@Now);CompUser!="";CompUser;"")  

This will place the username and the time in the CompUser field when the FormComp checkbox is checked. It will also remove the user and time info if the checkbox is unchecked.

Hope this helps

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close