Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checkbox to do a date time stamp

Status
Not open for further replies.

rphbrew

Technical User
Nov 30, 2002
40
US
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?
 
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.

HTH!



Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top