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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date and time stamp on form

Status
Not open for further replies.

wolfpackman

Technical User
Mar 26, 2001
3
US
I have a tooling program that I am trying to make a button to automatically stamp the start time/date and a button for the finish time/date. There have been too many errors by the employees typing in the dates and times. Do you have any ideas to incorporate this function into the form? Also I would also like to calculate the total accumulated time of the jobs and I'm not sure what type of format to have the times in.
 
wolfpackman

could you have two fields on the form, one for starting time, one for ending time. then tie the onopen event to inserting the begining time, and the on close event to inserting an ending time.

also as another option, instead of having users type the dates or time values into the fields, prevent that editing, but instead have up/down buttons right next to the field which will increase the value of the field by a minute or an hour, day whatever.

You use the datediff function to find the difference in time between two dates/times.
DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
 
My idea would be:

Setup either a function key to automatically insert the current date and/or time.

And/Or

The double click event to set the current date/time when the user double clicks the textbox itself.

Both I've used before and both seem to work fairly well. Using both allows for the rapid data entry (using only the keyboard) that frequent users love. The double-click method may have to be illustrated a little for the user. I've placed a simple note on the screen to remind them of this. Forcing proper input with an input mask is also a good idea if you haven't already implemented that.


Jus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top